Issue Details (XML | Word | Printable)

Key: PCC-69
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Jonathan Gray
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

cpp processes code incorrectly

Created: 07/Aug/09 10:36 PM   Updated: 08/Aug/09 09:26 AM
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File e.c (0.4 kB)

Environment: OpenBSD/i386 -current, pcc cvs

 Description  « Hide
Since the overhaul cpp incorrectly processes a nested define involving pastes.

#define ELF32_NO_ADDR ((uint32_t) ~0) /* Indicates addr. not yet filled in */
#define ELFSIZE 32
#define __CONCAT(x,y) x ## y
#define CONCAT(x,y) __CONCAT(x,y)

then trying:

e.c, line 14: ELF32_NO_ADDR undefined

test case to reproduce this attached.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 08/Aug/09 09:26 AM
Fixed now. Thanks for reporting this bug.