Re: [PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402, PR102033, PR102034, PR102039, PR102

2021-10-14 Thread Nick Huang via Gcc-patches
hi Jason, IMHO, I think your patch probably finally solved this long-standing Core 1001 issue. Of course it is not up to me to say so. I just want to point out that it even solves the following case, even though it is more or less expected if concept and lambda all work expectedly. template conce

[PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402, PR102033, PR102034, PR102039, PR102

2021-10-08 Thread Nick Huang via Gcc-patches
First of all, I am sorry for my late response as I missed your email. I need to update my filter setup of gmail after switching from hotmail. >I think WILDCARD_TYPE_P is what you want, except... I will try this one. >Your patch rejects that testcase even without the specialization on >int[], whic

Re: [PATCH] c++: Comment out announce_function to prevent ICE [PR102426]

2021-10-07 Thread Nick Huang via Gcc-patches
I am terribly sorry for my typo of wrong PR #, it should be 102624. Please ignore this email thread and I resend the patch in next email with correct subject: [PATCH] c++: Comment out announce_function to prevent ICE [PR102624] Once again my apologies for spam. On Fri, Oct 8, 2021 at 12:31 AM qin

Re: [PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402, PR102033, PR102034, PR102039, PR102

2021-10-03 Thread Nick Huang via Gcc-patches
Here I attach [PATCH-v2]. On Sun, Oct 3, 2021 at 7:14 AM Nick Huang wrote: > > Hi Jason, > > I made a little improvement of my fix by including template > type parameter to not dropping cv-const because they are similar to dependent > type which you cannot determine whether they are top-level cv-

[PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402, PR102033, PR102034, PR102039, PR102

2021-10-03 Thread Nick Huang via Gcc-patches
Hi Jason, I made a little improvement of my fix by including template type parameter to not dropping cv-const because they are similar to dependent type which you cannot determine whether they are top-level cv-qualifier or not until instantiation. + if (processing_template_decl +

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-10-01 Thread Nick Huang via Gcc-patches
> ...the subject line for the commit should be the first line of the > commit message, followed by a blank line, followed by the description of > the patch; without the subject line, git format-patch thought your whole > description was the subject of the patch. oh, I didn't realize this without

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-10-01 Thread Nick Huang via Gcc-patches
> gcc-verify still fails with this version: > > > ERR: line should start with a tab: "PR c++/101783" > > ERR: line should start with a tab: "* tree.c > > (cp_build_qualified_type_real): Excluding typedef from error" > > ERR: line should start with a tab: "PR c++/101783" > > ERR: line s

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-09-30 Thread nick huang via Gcc-patches
ment. Thank you again for your patient explanation and help! On 9/26/21 21:31, nick huang via Gcc-patches wrote: > Hi Jason, > > 1. Thank you very much for your detailed comments for my patch and I really > appreciate it! Here is my revised patch: > > The root cause of

Re: *PING* [PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402,PR102033,PR102034,PR102039,PR102044]

2021-09-26 Thread nick huang via Gcc-patches
>>template >>struct A >>{ >> void f(T); >>}; >> >>template >>void A::f(const T) >>{ } >> >>which is certainly questionable code, but is currently also accepted by >>clang and EDG compilers. I just found out that clang actually correctly reject this code during specialization. (https://www.g

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-09-26 Thread nick huang via Gcc-patches
ment. However, I just sent email to ass...@gnu.org to request assignment. Alternatively, I am not sure if adding this "signoff" tag in submission will help? Signed-off-by: qingzhe huang Thank you again! > On 8/28/21 07:54, nick huang via Gcc-patches wrote: > > Reference with c

Re: *PING* [PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402,PR102033,PR102034,PR102039,PR102044]

2021-09-25 Thread nick huang via Gcc-patches
Hi Jason, Sorry for not noticing your response. >>Unfortunately, your patch breaks >> >>template >>struct A >>{ >> void f(T); >>}; >>template >>void A::f(const T) >>{ } 1. Perhaps I misunderstand your comment, but my patch does NOT fix this issue. Neither does current GCC fix this code, if

*PING* Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-09-24 Thread nick huang via Gcc-patches
Reference with cv-qualifiers should be ignored instead of causing an error because standard accepts cv-qualified references introduced by typedef which is ignored. Therefore, the fix prevents GCC from reporting error by not setting variable "bad_quals" in case the reference is introduced by typed

*PING* [PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402,PR102033,PR102034,PR102039,PR102044]

2021-09-24 Thread nick huang via Gcc-patches
These bugs are considered duplicate cases of PR51851 which has been suspended since 2012, an issue known as "core1001/1322". Considering this background, it deserves a long comment to explain. Many people believed the root cause of this family of bugs is related with the nature of how and when

[PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402,PR102033,PR102034,PR102039,PR102044]

2021-08-31 Thread nick huang via Gcc-patches
These bugs are considered duplicate cases of PR51851 which has been suspended since 2012, an issue known as "core1001/1322". Considering this background, it deserves a long comment to explain. Many people believed the root cause of this family of bugs is related with the nature of how and when

[PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-08-28 Thread nick huang via Gcc-patches
Reference with cv-qualifiers should be ignored instead of causing an error because standard accepts cv-qualified references introduced by typedef which is ignored. Therefore, the fix prevents GCC from reporting error by not setting variable "bad_quals" in case the reference is introduced by typed

[PATCH] c++: Fix unnecessary error when top-level cv-qualifiers is dropped [PR101783]

2021-08-09 Thread nick huang via Gcc-patches
The root cause of this bug is that it considers reference with cv-qualifiers as an error by generating value for variable "bad_quals". However, this is not correct for case of typedef. Here I quote spec: "Cv-qualified references are ill-formed except when the cv-qualifiers are introduced through th

[C++ PATCH] Fix unnecessary error when top-level cv-qualifiers is dropped (PR c++/101783)

2021-08-09 Thread nick huang via Gcc-patches
The root cause of this bug is that it considers reference with cv-qualifiers as an error by generating value for variable "bad_quals". However, this is not correct for case of typedef. Here I quote spec: "Cv-qualified references are ill-formed except when the cv-qualifiers are introduced through