This is the mail archive of the gcc-patches@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]

Re: [C++ patch] accept __null as sentinel


Hi,

On Fri, 29 Apr 2005, Mark Mitchell wrote:

> from BeOS to Windows to VxWorks to IRIX.  The implication that we're
> living in an ivory tower and don't know anything about programming in
> the real world is simply not true.

Perhaps not.  I guess your world is dominated by engineers getting payed
for maintaining what they wrote, and what's more, willing to listen to
advice.  And usually you probably interfaced with a relatively limited set
of people each time.  As your wrote, customers.  So, you don't live in an
ivory tower, but in a different world than me (for instance).  My one
world (from whose p.o.v I'm arguing here) is inhabited by programs mostly
from an amorph set of hobbyists, where you can't see the usefull messages 
from the compiler, because of the huge set of useless ones, whose authors 
only know i386 and gcc (and even worse, only _care_ for those), are not 
known personally, only reachable by mail, if at all.  100s of them.

> > portability, well, there's -pedantic.  Let's keep -Wall usable and not
> > force people to do "-W -Wall -Wno-not-this-one -Wno-thats-dumb-too
> > -Wno-cant-break-anything" to get at the usefull warnings.
> 
> Fine; then -Wformat=2 is a reasonable place.

If you can agree with Joseph on that one, I would consider implementing it 
there.  The reason I ask is because -Wformat has a specific purpose, 
whereunder the sentinel attribute does not fall.

> > A criteria for usefull warnings _to me_ (I fully realize that's not
> > the opinion of all), is "can it change code harmfully depending on the
> > architecture or circumstances, when compiled on a GNU system".
> 
> That's indeed a useful category of warnings, and I'd be happy to have a
> switch for that.  But -Wall isn't presently that option; for example, -W
> adds support for warning about falling off a function, which clearly can
> cause problems when compiled on a GNU system.

Right.  One reason why many people caring for warnings use -W -Wall.  I've 
never understood why there are two flags representing collections of 
warnings, which have no clear separation.

Hopefully, when the warning infrastructure in trunk matures, we can easily 
implement such collection option.


Ciao,
Michael.


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