Issue Details (XML | Word | Printable)

Key: PCC-176
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Nicolas Joly
Votes: 0
Watchers: 0
Operations

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

#include_next failure within conditionals

Created: 07/Nov/10 11:39 AM   Updated: 07/Nov/10 11:54 AM
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

Environment:
NetBSD petaure.lan 5.99.39 NetBSD 5.99.39 (PETAURE) #10: Sat Nov 6 20:30:46 CET 2010 njoly@petaure.lan:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/PETAURE amd64

pcc 0.9.9 for x86_64-unknown-netbsd5.99.39, njoly@petaure.lan Sun Nov 7 11:29:56 CET 2010


 Description  « Hide
The following piece of code fails to compile when #include_next directive is located within a conditional
which is not active, and succeed otherwise.

njoly@petaure [~]> cat include.c
#ifdef USE_NEXT
#include_next <stdlib.h>
#endif

int main() { return 0; }

njoly@petaure [~]> pcc -UUSE_NEXT include.c; echo $?
/usr/include//stdlib.h:329: error: unterminated conditional
1
njoly@petaure [~]> pcc -DUSE_NEXT include.c; echo $?
0
njoly@petaure [~]> pcc -E -UUSE_NEXT include.c
[...]
# 1 "include.c"


# 1 "/usr/include//stdlib.h"
/usr/include//stdlib.h:329: error: unterminated conditional


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson made changes - 07/Nov/10 11:53 AM
Field Original Value New Value
Assignee Anders Magnusson [ ragge ]
Anders Magnusson made changes - 07/Nov/10 11:54 AM
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]