🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1282

'\e' vs '\E' in GCC 2.3.1

#1282
From: Paul Eggert
Date: Fri, 06 Nov 1992 04:38
100 lines
3635 bytes
GCC 2.3.1's documentation says that '\e' stands for the ASCII character ESC.
The GNU C preprocessor agrees, but the C and C++ compilers say that you
should use '\E'; also, the C compiler warns about its use.

Given the confusion, I'd guess that this extension is so little-used that it
should be removed.  Here is a patch.

	* c-lex.c, cp-lex.c (readescape): Remove support for '\E'.
	* cexp.y (parse_escape), extend.texi: Likewise, for '\e'.
	(Note that they were inconsistent.)

===================================================================
RCS file: c-lex.c,v
retrieving revision 2.3
retrieving revision 2.3.1.1
diff -c -r2.3 -r2.3.1.1
*** c-lex.c	1992/10/08 07:07:25	2.3
--- c-lex.c	1992/11/06 04:30:09	2.3.1.1
***************
*** 905,914 ****
  #endif
        return TARGET_VT;
  
-     case 'E':
-       pedwarn ("non-ANSI-standard escape sequence, `\\E'");
-       return 033;
- 
      case '?':
        return c;
  
--- 905,910 ----
===================================================================
RCS file: cp-lex.c,v
retrieving revision 2.3
retrieving revision 2.3.1.1
diff -c -r2.3 -r2.3.1.1
*** cp-lex.c	1992/10/20 18:54:29	2.3
--- cp-lex.c	1992/11/06 04:30:09	2.3.1.1
***************
*** 2275,2283 ****
      case 'v':
        return TARGET_VT;
  
-     case 'E':
-       return 033;
- 
      case '?':
        /* `\(', etc, are used at beginning of line to avoid confusing Emacs.  */
      case '(':
--- 2275,2280 ----
===================================================================
RCS file: extend.texi,v
retrieving revision 2.3
retrieving revision 2.3.1.1
diff -c -r2.3 -r2.3.1.1
*** extend.texi	1992/10/21 21:57:06	2.3
--- extend.texi	1992/11/06 04:30:09	2.3.1.1
***************
*** 39,45 ****
                           or that they can never return.
  * Function Prototypes:: Prototype declarations and old-style definitions.
  * Dollar Signs::        Dollar sign is allowed in identifiers.
- * Character Escapes::   @samp{\e} stands for the character @key{ESC}.
  * Variable Attributes::	Specifying attributes of variables.
  * Alignment::           Inquiring about the alignment of a type or variable.
  * Inline::              Defining inline functions (as fast as macros).
--- 39,44 ----
***************
*** 1278,1289 ****
  lose (test)
  @end example
  
- @node Character Escapes
- @section The Character @key{ESC} in Constants
- 
- You can use the sequence @samp{\e} in a string or character constant to
- stand for the ASCII character @key{ESC}.
- 
  @node Alignment
  @section Inquiring on Alignment of Types or Variables
  @cindex alignment
--- 1277,1282 ----
===================================================================
RCS file: cexp.y,v
retrieving revision 2.3.1.1
retrieving revision 2.3.1.2
diff -c -r2.3.1.1 -r2.3.1.2
*** cexp.y	1992/11/06 01:29:53	2.3.1.1
--- cexp.y	1992/11/06 04:30:09	2.3.1.2
***************
*** 747,754 ****
        return TARGET_BELL;
      case 'b':
        return TARGET_BS;
-     case 'e':
-       return 033;
      case 'f':
        return TARGET_FF;
      case 'n':
--- 747,752 ----
Technical Details
Message-ID: <9211060438.AA04239@farside.twinsun.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!twinsun.COM!eggert

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!twinsun.COM!eggert
From: eggert@twinsun.COM (Paul Eggert)
Subject: '\e' vs '\E' in GCC 2.3.1
Message-ID: <9211060438.AA04239@farside.twinsun.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 6 Nov 1992 04:38:19 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 101