From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31076 invoked by alias); 1 Sep 2005 23:05:19 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31051 invoked by uid 48); 1 Sep 2005 23:05:11 -0000 Date: Thu, 01 Sep 2005 23:05:00 -0000 From: "simon_baldwin at yahoo dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20050901230506.23688.simon_baldwin@yahoo.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/23688] New: Compiler does not warn on selected unknown character escapes X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg00154.txt.bz2 List-Id: Given the following short test program: const char *s1 = "\%\(\[\{"; // all these are invalid escape sequences const char *s2 = "\)\]\}"; // so are these the compiler warns about the unknown escape sequences in s2 (and everything else you can come up with), but ignores the particular sequences in s1, even though they're just as invalid. >>From section 2.13.2, paragraph 3, of the 1998 C++ Standard: Certain nongraphic characters, the single quote ', the double quote ", the question mark ?, and the back-slash \, can be represented according to Table 5. ... If the character following a backslash is not one of those specified, the behavior is undefined. A warning for these four renegade unknown escapes, then, would be useful. -- Summary: Compiler does not warn on selected unknown character escapes Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: minor Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: simon_baldwin at yahoo dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23688