Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!BU.EDU!david%ics.com From: david%ics.com@BU.EDU Newsgroups: gnu.utils.bug Subject: curiosity in gcc 1.36; ANSI behavior? Message-ID: <8912061438.AA00359@melvin.ics.com.ics.com> Date: 6 Dec 89 14:38:00 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 31 This is the behavior with gcc 1.36 (no fixes) on a Sun 4/60: #include #define A(x) #define B(x,y) #define C(x,y) main() { A(); /* flagged by gcc but not cc */ B(); /* flagged by gcc and cc */ C(,); /* not flagged by gcc or cc */ } gcc testing.c testing.c:9: no args to macro `A' testing.c:10: no args to macro `B' cc testing.c testing.c: 10: B: argument mismatch I can see that C is OK and I can see that B could be considered not OK. But the different handling of A is a problem in that there does not seem to be a general way to indicate 0 arguments to that macro. gcc -traditional testing.c testing.c:10: no args to macro `B' So is this behavior really ANSI, or is there something else going on?