This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR c++/64626 - C++14 single quote should not always be a digit separator


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]