Patch -Wtraditional, warn about `U' integer constant suffix

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Mon Aug 7 10:55:00 GMT 2000


 > From: Zack Weinberg <zack@wolery.cumb.org>
 > 
 > On Mon, Aug 07, 2000 at 10:15:29AM -0700, Richard Henderson wrote:
 > > On Mon, Aug 07, 2000 at 11:57:17AM -0400, Kaveh R. Ghazi wrote:
 > > > Due to another recent K&R problem in loop.c involving the `U' integer
 > > > constant suffix, I've written a patch so that -Wtraditional warns
 > > > about using it in cpp and cc1.  Testing is in progress.
 > > 
 > > You want to warn about the L suffix as well.
 > 
 > So no suffixes at all for K+R numeric constants?


SunOS4, which I use as a benchmark, supports `L'.  However I've
noticed in the past it has supported some extensions, e.g. void*.
I don't know whether all K&R compilers grok `L' or not.


 >   What about floating
 > point constants?
 > zw

Those definitely do kill K&R.  I can update the patch to warn about
float constant suffixes too.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


More information about the Gcc-patches mailing list