[patch] beginnings of the macro rewrite

Zack Weinberg zack@wolery.cumb.org
Fri Apr 21 13:39:00 GMT 2000


On Fri, Apr 21, 2000 at 11:52:28AM -0700, Stan Shebs wrote:
> Zack Weinberg wrote:
> > 
> > IMPORTANT: This drops support for traditional macros.  I will put it
> > back if people complain loudly enough.  If no one cares then I will
> > probably drop -traditional entirely, sometime next week.
> > -Wtraditional still works.
> 
> It might not get too much reaction on this list, but I suggest
> you make this checkin anonymously, so the lynch mob of users
> won't be able to come find you. 1/2 :-)
> 
> -traditional will be important to support in GCC for at least
> another 10 years, possibly longer, depending on the longevity
> of various old code bases.

*sigh* I was hoping 10 years past the adoption of C89 was long
enough.  This isn't Fortran, after all... :)

Are you familiar enough with any of those legacy code bases to know if
the following compromise position will be acceptable?

Macros are never expanded recursively.
The C89 stringify and paste operators always work.
Token concatenation only happens when there's an explicit
comment-as-paste marker; at all other times C89's rules are in force.

This mode should allow a relatively clean implementation of the
backward compatibility features - and at the same time it will permit
use of -traditional on systems with aggressively modern header files
(or anyway the preprocessor won't cause trouble).

zw


More information about the Gcc-patches mailing list