Bug 61066 - cpp version 2.96 does not warn on macro redefinition
Summary: cpp version 2.96 does not warn on macro redefinition
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cpp (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-12 23:06 UTC by neal nuckolls
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-15 19:30:22 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description neal nuckolls 2002-03-12 23:06:50 UTC
Description of Problem:
All C preprocessors prior to 2.96 that I've ever used will warn
whenever a cpp macro is redefined to a "non-trivial" different value.
Not 2.96 .  The 2.96 cpp does not produce a warning for this
unless you set the -pedantic option.
This is inconsistent with the cpp documentation which explicitly says
that cpp macro redefines produce a warning period.
Please fix.

Version-Release number of selected component (if applicable):
# cpp -dumpversion
2.96

How Reproducible:
Totally.
The cpp in the i386 C toolchain that came with RedHat 6.0
does not have this problem.

Steps to Reproduce:
1. Create a file containing the two lines:
#define	FOO	1
#define	FOO	2
2. compile it on redhat 7.2 "cc -c t.c" -- no warnings
3. compile it on an older redhat release like 6.2, viola warnings.
(cpp -dumpversion on that system says "egcs-2.91.66").

Actual Results:


Expected Results:


Additional Information:

Comment 1 Alan Cox 2002-12-15 19:30:22 UTC
Tested and warns fine on gcc 3.2



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