Description of problem: Version-Release number of selected component (if applicable): g++ (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-52) How reproducible: Completely. Steps to Reproduce: 1. Create a file bug.cpp with the following text: #line 32768 "test.c" #line 32767 "test.c" 2. g++ -o -pedantic -Werror test.cpp Actual results: bug.cpp:1:7: line number out of range (plus no .o file is generated due to -Werror) Expected results: No error message and generate .o Additional info: Apparently g++ requires numbers in line directives to fit in a signed 16-bit number, since 32767 is OK but 32768 is not.
Sorry. Step 2 should have been 2. g++ -o -pedantic -Werror bug.cpp
Please read the standard: ISO/IEC 14882:1998 In [cpp.line]/3: "If the digit sequence specifies zero or a number greater than 32767, the behavior is undefined."