This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

public and extern


My assembler needs an "extern" for each symbol reference which is referenced in the compilation but not defined. It also needs a "public" to make symbols public to other files. It don't, however, handle using both "extern" and "public" on the same symbol.

In the test program

static __inline__ int f() { return g(); }
int g() { return f(); }

g() is marked "extern" before printing the f() function body, but also marked "public" when its body is defined. How can I make GCC drop the "extern" when the function body is defined later in the file?

The answer is probably in ASM_OUTPUT_EXTERNAL. I have tryed to use the decl argument, which is the tree node for the declaration, but didn't find the answer.

Anders


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]