[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Patch: Permit certain pointer assignments (grischka-2

From: David A. Wheeler
Subject: Re: [Tinycc-devel] Patch: Permit certain pointer assignments (grischka-2005-09-25 case_7)
Date: Thu, 03 May 2007 11:06:47 -0400 (EDT)

BTW, the grischka-2005-09-25 case_7 (that I just posted) is by no means 
"perfect".  It turns an error into a warning, and that has two potential 
* It warns about stuff it perhaps should just accept outright (as gcc does), 
even if the C standard says supporting it isn't required.
* It merely warns about stuff it should perhaps reject outright.

But figuring out what it should reject outright, and what it should accept 
outright, is non-trivial; I frankly wasn't sure what should be in those other 
categories.  I started to examine the cdoe to figure out what to place in those 
other categories, and quickly came to realize why grischka did it this way.  So 
I ended up doing it his way: warn but accept it all.

I think the right first step is this patch, which warns yet accepts lots of 
constructs.  Once there's some experience with this patch, we can add additions 
either way (to remove warnings, or reconstrain some constructs as errors again).

Most importantly, with this patch, code that wouldn't compile before (like 
constructs in gcc's source) will compile now.  In my mind, what's most 
important is accepting existing, widely-used code that ALREADY compiles 
elsewhere.  Accepting "illegal" code with a warning isn't so bad (compilers are 
allowed to accept extensions anyway) and extraneous warnings are merely 
annoying. But failing to compile existing widely-used code is deadly.

--- David A. Wheeler

reply via email to

[Prev in Thread] Current Thread [Next in Thread]