This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: The \e escape sequence
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: cagney at gnu dot org, kettenis at chello dot nl
- Cc: gdb at sources dot redhat dot com, jimb at redhat dot com
- Date: Wed, 31 Dec 2003 14:18:48 -0500 (EST)
- Subject: Re: The \e escape sequence
Welcome back, Andrew!
> What's ISO C 90 got to say about it (I gather it isn't part of that
> version of ISO C).
I don't know what the standard says, but here is what gcc thinks that
the standard says:
[mec.gnu@berman tmp]$ cat slash-e.c
char c = '\e';
[mec.gnu@berman tmp]$ gcc -std=iso9899:1990 -pedantic -c slash-e.c
slash-e.c:1:10: warning: non-ISO-standard escape sequence, '\e'
[mec.gnu@berman tmp]$ gcc -std=iso9899:199409 -pedantic -c slash-e.c
slash-e.c:1:10: warning: non-ISO-standard escape sequence, '\e'
[mec.gnu@berman tmp]$ gcc -std=iso9899:1999 -pedantic -c slash-e.c
slash-e.c:1:10: warning: non-ISO-standard escape sequence, '\e'
It's also documented in "info gcc" as an extension to ISO C.
> If it isn't then it shouldn't be used or tested
> (except barely maybe in a GCC specific test).
Sounds good to me.
Michael C