Issue Details (XML | Word | Printable)

Key: PCC-79
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Detlef Riekenberg
Votes: 0
Watchers: 0
Operations

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

cpp does not support #warning (with testcase and proposed patch)

Created: 16/Aug/09 06:58 PM   Updated: 13/Jun/10 09:17 PM
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File add_support_for_#warning.diff (1.0 kB)
2. File w.c (1 kB)

Environment: i386-linux (Ubuntu 8.04)


 Description  « Hide
While inspecting a different issue, an inserted "#warning" was not displayed with pcc

Attached is a testcase and a proposed patch for <pcc>/cc/cpp/token.c
The codepath in the testcase can be modified with -DWARN_INSIDE_IF

PCC is still a bit different with the proposed patch, but i see no need to imitate that behaviour yet:
- gcc remove the comments in a warning
- gcc bail out on unterminated quotes
- gcc convert TAB and SPACE in the warning text to a single space


Why has <pcc>/cc/cpp/scanner.l similar code?
When is scanner.l used?

--
By by ... Detlef



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 18/Aug/09 09:27 PM
#warning is not specified by C99, but since gcc has it I think pcc also should have it, so thanks, I'll look at it.

scanner.l is there because it was used before to splitup input files. I have rewritten it now in token.c, using lex is terrible slow.


Anders Magnusson added a comment - 13/Jun/10 09:17 PM
Thanks, applied (at last...).