This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: pragma warnings
- To: jody at atdesk dot com
- Subject: Re: pragma warnings
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Tue, 13 Jul 1999 14:28:39 +0100
- CC: egcs at egcs dot cygnus dot com
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