Dear All,
Please remove my e-mail adress from your list
E-mail: [email protected]
Thanks,
E van den Boom
----- Original Message -----
From: "JMGross" <[email protected]>
To: "MSPGCC mailing list," <[email protected]>
Sent: Tuesday, January 26, 2010 12:33 PM
Subject: Re: [Mspgcc-users] Possible preprocessor bug -> solved
After discovering that in system header files (and only there) some warnings
such as a macro redefinition do not show up, I found the following deep in
the GCC documentation at gcc.gnu.org:
The header files declaring interfaces to the operating system and runtime
libraries often cannot be written in strictly conforming C. Therefore, GCC
gives code found in system headers special treatment. All warnings,
other than those generated by `#warning' (see Diagnostics), are suppressed
while GCC is processing a system header. Macros defined in a system header
are immune to a few warnings wherever they are expanded.
This immunity is granted on an ad-hoc basis, when we find that a warning
generates lots of false positives because of code in macros defined in
system headers.
<<<<<<<<<<<
So it is intentional that all warnings are suppressed in a system header
file, however severe the consequences might be.
While this is not a problem for a plain compiler user (who has to trust the
creators of the system header files), it could cause havoc on a living and
evolving development like the MSPGCC itself.
GCC does not have any way to disable this (while you can force it by using
the system_header pragma).
So if you are working on the system header files, you should add the system
include directory as a normal directory using the -I option in the makefile.
This way, the system header files are searched there as normal
files and the warning suppression does not apply (unless the system_header
pragma is used in the files).
JMGross
----- Ursprüngliche Nachricht -----
Von: JMGross
An: MSPGCC mailing list,
Gesendet am: 25 Jan 2010 13:27:22
Betreff: Re: [Mspgcc-users] Possible preprocessor bug
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the
business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users