Patch to poison (or wrap with !IN_GCC?) ansidecl.h macros
Richard Earnshaw
rearnsha@arm.com
Thu Jun 19 10:31:00 GMT 2003
> "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
>
> > This patch ensures we don't regress into reusing the ansidecl.h macros
> > for K&R compatibility. The two major macros (PARAMS and PTR) probably
> > can't go in here even after they're all cleaned out because they're
> > used in the libiberty headers which we include all over the place.
> > Nevertheless at least these won't come back.
> >
> > I came up with two approaches. One was poisoning the macros, which
> > I've included below. The other would be to move the macros within
> > ansidecl.h into the !IN_GCC clause where we store other obsoleted
> > macros we don't want to use. (Look in ansidecl.h to see what I mean.)
>
> I think we can't modify ansidecl.h without consultation with other
> projects that use it. Other opinions?
I think we should consider importing GDB's ARI script (suitably adapted)
as a way of tracking this sort of issue. See
http://sources.redhat.com/gdb/current/ari/
We can then track more easily that files that have been converted to ISO
C, for example, don't grow new functions in K&R style.
R.
More information about the Gcc-patches
mailing list