Issue Details (XML | Word | Printable)

Key: PCC-359
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Iain Hibbert
Reporter: Iain Hibbert
Votes: 0
Watchers: 0
Operations

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

cpp does not leave comments in expanded macros, even with -CC

Created: 22/Jun/11 09:29 PM   Updated: 26/Sep/12 08:32 PM
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File diff2 (0.5 kB)

Environment:
NetBSD/i386


 Description  « Hide
comments are discarded inside macro expansions, even when -CC is
passed to the preprocessor (or front-end), this is important for use with
lint which likes to take note of comments such as in the following macro

#define macro(x) do { foo(x); } while (/*CONSTCOND*/0)

in order to disable warnings about constant conditionals..

"gcc -C" retains comments except in macro expansions
"gcc -CC" retains all comments

I marked this as Minor, since in the context of a C compiler this is not
an essential feature, but lint is a useful tool especially so for pcc which
does not contain as much code analysis as some other compilers

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Iain Hibbert made changes - 08/Jul/11 10:49 PM
Field Original Value New Value
Attachment diff [ 10206 ]
Iain Hibbert made changes - 09/Jul/11 10:51 AM
Attachment diff2 [ 10207 ]
Iain Hibbert made changes - 09/Jul/11 10:53 AM
Attachment diff [ 10206 ]
Iain Hibbert made changes - 27/Jul/11 05:13 PM
Status Open [ 1 ] Closed [ 6 ]
Assignee Iain Hibbert [ plunky ]
Resolution Fixed [ 1 ]
Iain Hibbert made changes - 08/Aug/12 08:29 PM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Iain Hibbert made changes - 26/Sep/12 08:32 PM
Status Reopened [ 4 ] Closed [ 6 ]
Resolution Fixed [ 1 ]