This is the mail archive of the
mailing list for the GCC project.
Re: "introduce no new bootstrap warning" criteria. was: Loop iv debugging, patch
- To: geoffk at redhat dot com
- Subject: Re: "introduce no new bootstrap warning" criteria. was: Loop iv debugging, patch
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Sat, 13 Jan 2001 07:33:46 -0500 (EST)
- Cc: aj at suse dot de, dewar at gnat dot com, dkorn at pixelpower dot com, gcc at gcc dot gnu dot org, jsm28 at cam dot ac dot uk, robertlipe at usa dot net
> From: Geoff Keating <email@example.com>
> > From: "Kaveh R. Ghazi" <firstname.lastname@example.org>
> > I looked into what it would take to turn on -Werror and/or
> > -pedatic-errors and that doesn't seem possible. There are too many
> > unfixable messages requiring a pragma silencer and also many warnings
> > only appear on unusual platforms so we'd have a real hard time getting
> > this to work without breaking bootstrap on lots of systems. Plus any
> > time a new warning is added to -Wall, it would break systems until
> > completely silenced also.
> Why do we have unfixable warnings in -Wall? They're not supposed
> to be there.
Recall that if we activate -Werror, we must have zero warnings on all
platforms, even old strange broken ones. Here are some examples of
annoying or impossible to fix problems:
* On solaris, the system header definition of __GTHREAD_ONCE_INIT
causes missing initializer warnings. Generically, any warning caused
by a macro defined in system headers but used in user code is trouble.
Checking in_system_header doesn't work for these.
* On systems where %p isn't supported, the backup method for printing
pointers using appropriate sized integer specifiers always causes
-Wformat warnings. I don't think this one has a solution.
* On non-POSIX/non-USG "BSD" systems, e.g. sunos4, we don't include
string.h in tsystem.h. This causes numerous implicit decl warnings
for the string functions. We can't provide the backup decls because
they might conflict with platforms that do supply them and we can't
use autoconf in tsystem.h to confitionally provide them.
* On K&R systems, many system header prototypes (especially those
returning int which exist implicitly) aren't available unless one
defines __USE_FIXED_PROTOTYPES__. We might want to define that during
bootstrap, but I don't know if it is safe for all platforms.
Otherwise it would have been done already.
My point is that -Werror requires *every* platform to have zero
warnings. I think we could get *some* platforms down to zero, but its
not possible to get *all* of them IMHO.
Kaveh R. Ghazi Engagement Manager / Project Services
email@example.com Qwest Internet Solutions