This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: User-namespace pre#defines - new approach
Zack Weinberg wrote:-
> I'm now thinking that a different approach would be better. Suppose I
> add a new command line option (--deprecated-macro, say; it needn't be
> short) to cpplib, and change most of the existing -D[A-Za-z] instances
> to use it instead. The effect of --deprecated-macro FOO is to cause
> cpplib to define FOO, __FOO, and __FOO__; FOO gets left out if
> -ansi/-std=c*, and if it is defined, using it generates a warning.
>
> This (a) leaves specs free to define user-namespace macros if they
> have no choice; (b) should be easier to validate the patch; (c) still
> allows us to get rid of the %{!ansi:%{!std=c*:...yadda...}} nonsense
> in a lot of specs, often incorrectly, and the %p/%P nonsense in gcc.c;
> (d) offers a gentler transition than the original patch.
>
> Reactions?
Just the usual one - this hurts tradcpp, unless you do the same there.
[Repeat usual mantra about wouldn't-it-be-wonderful-if-cpplib-did-
traditional-preprocessing-too blah blah.]
Neil.