This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR c++/64626 - C++14 single quote should not always be a digit separator
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Daniel Krügler <daniel dot kruegler at gmail dot com>, Jason Merrill <jason at redhat dot com>, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Sun, 8 Mar 2015 19:52:06 +0100
- Subject: Re: PR c++/64626 - C++14 single quote should not always be a digit separator
- Authentication-results: sourceware.org; auth=none
- References: <54FC95DF dot 1000405 at verizon dot net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Mar 08, 2015 at 02:33:03PM -0400, Ed Smith-Rowland wrote:
> I just look to see if a lexed number in libcpp ends in a '.
> If so, back up one character and let string processing handle it.
>
> I get one warning and one error for each instance but I'd rather not error
> when it should pass.
>
> Built and tests clean on x86_64-linux.
>
> OK?
>
>
>
> libcpp/
>
> 2015-03-09 Edward Smith-Rowland <3dw4rd@verizon.net>
>
> PR c++/64626
> * expr.c (parse_has_attribute): New function; (eval_token): Look for
> __has_attribute__ and route to parse_has_attribute.
This ChangeLog entry doesn't match the patch, you've changed
lex.c (lex_number) instead...
> --- libcpp/lex.c (revision 221218)
> +++ libcpp/lex.c (working copy)
> @@ -1400,6 +1400,9 @@
> NORMALIZE_STATE_UPDATE_IDNUM (nst, *cur);
> cur++;
> }
> + /* A number can't end with a digit separator. */
> + if (DIGIT_SEP (cur[-1]))
> + --cur;
>
> pfile->buffer->cur = cur;
> }
Jakub