Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 22343 - ## gives erronous warnings in variable arguments macro expansions
## gives erronous warnings in variable arguments macro expansions
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2000-12-15 08:51 EST by Need Real Name
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-12-15 08:51:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2000-12-15 08:51:36 EST
--- t.c ---
#define NULL ((void *)0L)
void debug_Error(char *expr, char *fmt, ...)
#define Error(expr, message...)\
        ((expr) ? 0 : (debug_Error(  #expr, __FILE__, __LINE__,
__PRETTY_FUNCTION__, 1 , ## message, NULL), 1))

int main(int argc, char **argv) {
    Error(0, "URL data has invalid (not hexadecimal) value.");
--- end of t.c ---

Compiling this test program gives the warning
t.c:9:61: warning: pasting would not give a valid preprocessing token

Works fine without a warning in GCC 2.95.2 (SuSE 7.0) and EGCS 2.91.66
(RedHat 6.2)

rpm -q gcc
Comment 1 Jakub Jelinek 2000-12-15 09:36:38 EST
This is fixed since I think cpp-2.96-55 (definitely in rawhide current cpp

Note You need to log in before you can comment on or make changes to this bug.