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: C++14 digit separators..


On 10/28/2013 09:44 AM, Jason Merrill wrote:
On 10/28/2013 09:10 AM, Joseph S. Myers wrote:
On Sun, 27 Oct 2013, Ed Smith-Rowland wrote:

Here is an implementation for C++14 digit separators (single quote).

I tend to think that such features should come with a test that the
feature is not enabled for language / standard versions for which it
shouldn't be.  That is, something like

#define m(x) 0
int i = m(1'2)+(3'4);

Good idea.  Other than that, the patch looks good to me.

Jason


OK,

I had to add some more checks in libcpp.
After reading the standard a few times i figured out the magic words are "digit separators" - must have digit on both sides.
I also put in the suggested check above.

bootstrapped and fully tested on x86_64-linux.

Still OK?

Ed

Attachment: patch_digit_sep2
Description: Text document

Attachment: CL_digit_sep2
Description: Text document


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