Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Paul Eggert
Fri, 06 Nov 1992 01:38
cpp doesn't diagnose '\^X' (GCC 2.3.1)
Author: Paul Eggert
Date: Fri, 06 Nov 1992 01:38
Date: Fri, 06 Nov 1992 01:38
37 lines
1416 bytes
1416 bytes
GCC 2.3.1 (sparc, SunOS 4.1.2) does not diagnose the syntax error in the first
line of the following program:
#if '\^X'
main() { return 0; }
#endif
cc1 rejects '\^X', so the simplest fix is to have cpp reject it too:
Fri Nov 6 01:29:53 1992 Paul Eggert (eggert@twinsun.com)
* cexp.y (parse_escape): Don't accept '\^X'.
===================================================================
RCS file: cexp.y,v
retrieving revision 2.3
retrieving revision 2.3.1.1
diff -c -r2.3 -r2.3.1.1
*** cexp.y 1992/10/21 06:53:52 2.3
--- cexp.y 1992/11/06 01:29:53 2.3.1.1
***************
*** 764,776 ****
case 0:
(*string_ptr)--;
return 0;
- case '^':
- c = *(*string_ptr)++;
- if (c == '\\')
- c = parse_escape (string_ptr);
- if (c == '?')
- return 0177;
- return (c & 0200) | (c & 037);
case '0':
case '1':
--- 764,769 ----
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads