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: why is this a pedwarn?


Zack Weinberg wrote:
> 
> #line handling in cccp/cpplib issues a pedwarn for negative line
> numbers.  I don't see a good reason for this to not be an error.  Did
> anyone use negative line numbers in the distant past?

Why would it be an error? EGCS doesn't usually give an error unless it
absolutely has to. It lets you change const variable's with only a
warning*. While negative line numbers may be unusual, and against the
ISO standard, there's no reason to offer an error unless the compiler
can't handle it. And if it can't handle it, it may not be necessary to
offer a warning if it can work around it.

* Not that I entirely agree with this, but it does appear to be the
GCC/EGCS way.
-- 
David Starner - dstarner98@aasaa.ofe.org
Dullard: someone who, wanting a piece of information, takes down the
appropriate volume of the encyclopedia, looks up the item they need, and
then puts the volume away without reading anything else. - Peter
Dell'Orto, paraphrased from Philip Jose Farmer


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