Pelles C forum

Pelles C => Bug reports => Topic started by: stachel on November 01, 2010, 01:31:41 PM

Title: #include too deeply nested
Post by: stachel on November 01, 2010, 01:31:41 PM
Poide 6.50.4 terminates if i try to save a project with  *#include too deeply nested* error.

Here an example:


// main.c
#include "file1.h"

int main(void)
{
    return 0;
}



// file1.h
#include "file2.h"



// file2.h
#include "file1.h"



Title: Re: #include too deeply nested
Post by: Stefan Pendl on November 01, 2010, 02:17:20 PM
Your header files result in an endless loop.
You should never do this.
There is a pragma to include each file only once, which can be used to correct this problem.

It is still recommended to avoid circular references, which is what you have created.
Title: Re: #include too deeply nested
Post by: stachel on November 01, 2010, 07:15:06 PM
Maybe i expressed my self  not clearly.
IDE terminates if i push the *save* button. In version 5.0 it was ok.
Title: Re: #include too deeply nested
Post by: TimoVJL on November 01, 2010, 07:28:38 PM
Or Project -> Update all depedencies