Issue Details (XML | Word | Printable)

Key: PCC-394
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Anders Magnusson
Reporter: Hannes Loeffler
Votes: 0
Watchers: 0

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

error: out of macro space!

Created: 20/Jun/12 11:09 AM   Updated: 28/Jul/12 10:21 PM
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File macro.c (0.2 kB)

 Description  « Hide

I am not sure if this is really a bug or just my poor understanding of the preprocessor but the attached file will cause an error message if run with 'cpp macro.c':

macro.c:10: error: out of macro space!

The problem is obviously caused by the terminating slash in line 2. If removed cpp expands the macros just fine.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 27/Jul/12 09:44 PM
The construction // is created inside the macro while expanding, causing cpp to assume that it is a comment.
Logic must be added to distinguish this from a comment that is legal, created by -C for lint.

Anders Magnusson added a comment - 28/Jul/12 10:21 PM
Fixed now, thanks for the bug report!