Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-11-06 Thread Paolo Carlini
Hi, On 04/11/2017 23:37, Mukesh Kapoor wrote: I had included to get the definition of macro PRId64. I have now modified the test case to remove all includes. I have added the definition of the macro in the test case and also added declarations of functions sprintf() strcmp(). I have attached

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-11-04 Thread Mukesh Kapoor
On 11/3/2017 7:31 AM, Paolo Carlini wrote: Hi, On 02/11/2017 15:42, Jason Merrill wrote: This is a good suggestion. I have attached the revised patch. Thanks. OK, thanks! Thanks Jason. I was about to volunteer committing the patch but then noticed that the testcase includes quite a lot, e

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-11-03 Thread Paolo Carlini
Hi, On 02/11/2017 15:42, Jason Merrill wrote: This is a good suggestion. I have attached the revised patch. Thanks. OK, thanks! Thanks Jason. I was about to volunteer committing the patch but then noticed that the testcase includes quite a lot, eg, too, which we never include in the whol

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-11-02 Thread Jason Merrill
On Wed, Nov 1, 2017 at 4:45 PM, Mukesh Kapoor wrote: > On 11/1/2017 1:02 PM, Jason Merrill wrote: >> >> On Tue, Oct 31, 2017 at 12:17 PM, Mukesh Kapoor >> wrote: >>> >>> On 10/25/2017 6:44 PM, Mukesh Kapoor wrote: On 10/25/2017 4:20 AM, Nathan Sidwell wrote: > > On 10/25/2017 12

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-11-01 Thread Mukesh Kapoor
On 11/1/2017 1:02 PM, Jason Merrill wrote: On Tue, Oct 31, 2017 at 12:17 PM, Mukesh Kapoor wrote: On 10/25/2017 6:44 PM, Mukesh Kapoor wrote: On 10/25/2017 4:20 AM, Nathan Sidwell wrote: On 10/25/2017 12:03 AM, Mukesh Kapoor wrote: Thanks for pointing this out. Checking in the front end wil

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-11-01 Thread Jason Merrill
On Tue, Oct 31, 2017 at 12:17 PM, Mukesh Kapoor wrote: > On 10/25/2017 6:44 PM, Mukesh Kapoor wrote: >> >> On 10/25/2017 4:20 AM, Nathan Sidwell wrote: >>> >>> On 10/25/2017 12:03 AM, Mukesh Kapoor wrote: >>> Thanks for pointing this out. Checking in the front end will be difficult becau

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-31 Thread Mukesh Kapoor
On 10/25/2017 6:44 PM, Mukesh Kapoor wrote: On 10/25/2017 4:20 AM, Nathan Sidwell wrote: On 10/25/2017 12:03 AM, Mukesh Kapoor wrote: Thanks for pointing this out. Checking in the front end will be difficult because the front end gets tokens after macro expansion. I think the difficulty of fi

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-25 Thread Mukesh Kapoor
On 10/25/2017 4:20 AM, Nathan Sidwell wrote: On 10/25/2017 12:03 AM, Mukesh Kapoor wrote: Thanks for pointing this out. Checking in the front end will be difficult because the front end gets tokens after macro expansion. I think the difficulty of fixing this bug comes because of the requireme

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-25 Thread Mukesh Kapoor
On 10/25/2017 9:06 AM, Jason Merrill wrote: On Wed, Oct 25, 2017 at 7:20 AM, Nathan Sidwell wrote: On 10/25/2017 12:03 AM, Mukesh Kapoor wrote: Thanks for pointing this out. Checking in the front end will be difficult because the front end gets tokens after macro expansion. I think the diffic

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-25 Thread Jason Merrill
On Wed, Oct 25, 2017 at 7:20 AM, Nathan Sidwell wrote: > On 10/25/2017 12:03 AM, Mukesh Kapoor wrote: > >> Thanks for pointing this out. Checking in the front end will be difficult >> because the front end gets tokens after macro expansion. I think the >> difficulty of fixing this bug comes becaus

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-25 Thread Nathan Sidwell
On 10/25/2017 12:03 AM, Mukesh Kapoor wrote: Thanks for pointing this out. Checking in the front end will be difficult because the front end gets tokens after macro expansion. I think the difficulty of fixing this bug comes because of the requirement to maintain backward compatibility with the

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-24 Thread Mukesh Kapoor
On 10/24/2017 7:05 AM, Jason Merrill wrote: On Fri, Oct 20, 2017 at 3:52 PM, Mukesh Kapoor wrote: On 10/20/2017 11:00 AM, Mukesh Kapoor wrote: On 10/20/2017 10:45 AM, Nathan Sidwell wrote: On 10/20/2017 12:37 PM, Mukesh Kapoor wrote: This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-24 Thread Jason Merrill
On Fri, Oct 20, 2017 at 3:52 PM, Mukesh Kapoor wrote: > On 10/20/2017 11:00 AM, Mukesh Kapoor wrote: >> On 10/20/2017 10:45 AM, Nathan Sidwell wrote: >>> On 10/20/2017 12:37 PM, Mukesh Kapoor wrote: This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955. Handle user-def

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-20 Thread Mukesh Kapoor
On 10/20/2017 11:00 AM, Mukesh Kapoor wrote: Hi, On 10/20/2017 10:45 AM, Nathan Sidwell wrote: On 10/20/2017 12:37 PM, Mukesh Kapoor wrote: Hi, This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955. Handle user-defined literals correctly in lex_string(). An empty string follo

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-20 Thread Mukesh Kapoor
Hi, On 10/20/2017 10:45 AM, Nathan Sidwell wrote: On 10/20/2017 12:37 PM, Mukesh Kapoor wrote: Hi, This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955. Handle user-defined literals correctly in lex_string(). An empty string followed by an identifier is a valid user-defined li

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-20 Thread Nathan Sidwell
On 10/20/2017 12:37 PM, Mukesh Kapoor wrote: Hi, This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955. Handle user-defined literals correctly in lex_string(). An empty string followed by an identifier is a valid user-defined literal. Don't issue a warning for this case. a) why

[C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-20 Thread Mukesh Kapoor
Hi, This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955. Handle user-defined literals correctly in lex_string(). An empty string followed by an identifier is a valid user-defined literal. Don't issue a warning for this case. Bootstrapped and tested with 'make check' on x86_64-l