public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/18171] New: Problem with varargs in #define-macro
@ 2004-10-27 8:38 ingemar dot fransson at micronic dot se
2004-10-27 11:32 ` [Bug c/18171] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: ingemar dot fransson at micronic dot se @ 2004-10-27 8:38 UTC (permalink / raw)
To: gcc-bugs
The following code fails to compile with GCC 2.95.3, but is OK with GCC 3.3.3
(and also GCC 2.96 from RedHat):
/* test.c:2: badly punctuated parameter list in `#define' */
#define TRACE(args ...) printf(## args)
#define log(format, args...) printf("<%s:%s:%d>, " format, __FILE__,
__FUNCTION__, __LINE__, ## args)
int main(void)
{
log("Log %s ...\n", "this");
/* test.c:10: parse error before `)' */
log("Empty log ...\n");
}
* <Space> after "args" and before "..." in a macro fails to compile with the
error:
test.c:2: badly punctuated parameter list in `#define'
* "Macro-call" with empty args fails to compile with the error:
test.c:10: parse error before `)'
A <space> needs to be inserted at "__LINE__ ,"
--
Summary: Problem with varargs in #define-macro
Product: gcc
Version: 2.95.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ingemar dot fransson at micronic dot se
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18171
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/18171] Problem with varargs in #define-macro
2004-10-27 8:38 [Bug c/18171] New: Problem with varargs in #define-macro ingemar dot fransson at micronic dot se
@ 2004-10-27 11:32 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-27 11:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-27 11:32 -------
2.95.x is not going to be updated/changed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18171
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-27 11:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-27 8:38 [Bug c/18171] New: Problem with varargs in #define-macro ingemar dot fransson at micronic dot se
2004-10-27 11:32 ` [Bug c/18171] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).