code cleanliness bug

John Jannotti jj@lcs.mit.edu
Tue Dec 1 17:23:00 GMT 1998


EGCS folks:
  I don't think that gcc/system.h should
  #define _(String) String

Perl folks:
  I don't think CORE/config.h should
  #ifdef CAN_PROTOTYPE
  #define	_(args) args
  #else
  #define	_(args) ()
  #endif


Generally, shouldn't leading underscores (and by extension, a single
underscore) be reserved for system macros?  I'm not just being
pedantic, I ran into a conflict when trying to embed perl in cpp (ok,
perhaps a sick thing to do, but it works now if anyone is interested).
Interestingly enough, although you are using _ for two completely
different things (egcs uses it in preparation for gettext), I got by
happily with the same definition for both purposes.

  jj


ps.  perl folks:  it also seems bad to prototype main() in
CORE/proto.h  It means that if I don't declare my main with an env
pointer (I generally don't), I get conflicts.  (In particular, in this 
case, gcc's cpp wasn't prototyped that way.)



More information about the Gcc-bugs mailing list