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]

Re: pragma warnings


Hi Jody,

: > static const char rscid[]  __attribute__((unused)) = "$id:$";
: >
: > since it's static there is no conflict problem.  __attribute__((unused))
: 
: Sure there is.  Assume two header files, each with the above.  If you
: include both header files in the same program, the code will not compile.
: This is the dilemma.

OK then how about using assembler directives instead:

  asm(".ascii \"$id:$\"");

Of course this is not portable to other compilers, but neither are
pragmas.

Cheers
    Nick


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