From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Tim Shen <timshen91@gmail.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch] Let ordinary escaping in POSIX regex be valid
Date: Fri, 27 Sep 2013 11:17:00 -0000 [thread overview]
Message-ID: <CAH6eHdTfv5vLh+d8hCc0o3AF9FtHRcYrxnvmWA7X6OsQn4bKDg@mail.gmail.com> (raw)
In-Reply-To: <CAPrifD=NxYmDzZL1H7qm7Oysc-bC_A+TEEGNiYwwcuq-UfK=Zg@mail.gmail.com>
On 27 September 2013 03:15, Tim Shen wrote:
> POSIX ERE says that escaping an ordinary char, say R"\n" is not
> permitted, because 'n' is not a special char. However, they also say
> that : "Implementations are permitted to extend the language to allow
> these. Conforming applications cannot use such constructs."
>
> So let's support it not to make users surprised.
>
> Booted and tested under -m32 and -m64
I'm wondering whether we want to have a stricter mode that doesn't
allow them, to help users avoid creating non-portable programs. We
could check the value of the preprocessor macro __STRICT_ANSI__, which
is set by -std=c++11 but not by -std=gnu++11, although that's not
really the right flag. We want something more like the GNU shell
utils' POSIXLY_CORRECT.
next prev parent reply other threads:[~2013-09-27 9:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 8:15 Tim Shen
2013-09-27 11:17 ` Jonathan Wakely [this message]
2013-09-27 14:08 ` Paolo Carlini
2013-09-27 14:15 ` Jonathan Wakely
2013-09-27 20:30 ` Tim Shen
2013-09-27 22:13 ` Paolo Carlini
2013-09-28 16:34 ` Tim Shen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAH6eHdTfv5vLh+d8hCc0o3AF9FtHRcYrxnvmWA7X6OsQn4bKDg@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=timshen91@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).