<< Back to previous view

[PCC-176] #include_next failure within conditionals Created: 07/Nov/10  Updated: 07/Nov/10

Status: Closed
Project: pcc
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Nicolas Joly Assignee: Anders Magnusson
Resolution: Fixed Votes: 0
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   
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


 Comments   
Comment by Anders Magnusson [ 07/Nov/10 11:54 AM ]
Fixed now. Had forgotten to check the false flag.
Generated at Sat Aug 23 13:28:45 CEST 2014 using JIRA Enterprise Edition, Version: 3.13.1-#333.