Bug 22343 - ## gives erronous warnings in variable arguments macro expansions
## gives erronous warnings in variable arguments macro expansions
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2000-12-15 08:51:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
gcc-2.96-54
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
packages).

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