Hi Everyone,
I fixed the problem of having declarations elaborating within if,
while, etc. consditional expressions. For those that are interested, a
new context was needed for var decls that determines whether the type
should be an incomplete or complete type specification. Now I have a
another problem that needs some support from gfec.
The problem I am currently experiencing is that the
resulting source code will regenerate the type definition for a
composite type i.e. a struct or union that is actually defined in a
library header file. So, when the new code is compiled I get a
redefinition error.
Example:
#include <sys/stat.h>
...
struct stat mbuf;
....
is translated into:
struct stat {
...
...
} mbuf;
And so now the #include and this definition conflict. This happens
because during the retranslation the module encounters stat for the
first time in the declaration of mbuf and then creates a declaration for
it. This is a problem with any type defined in a header file such as a
struct..
My Idea:
If the GCC frontend determines that struct stat is defined in another
location either a library header or another file, then I want to
preserve this information to have the BE translator use it to
determine whether or not to create a definition of this type.
Does anyone have any idea of how / where I can get this kind of
information? or any other suggestions on how to tackle this problem.
Thanks,
Charles
--
--------------------------------------------------------------------
Charles R. Hardnett CREST at Ga Tech www.crest.gatech.edu
|