Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-11-01 Thread Jason Merrill
On Sat, Oct 19, 2019 at 6:35 PM Jakub Jelinek wrote: > > Hi! > > On Sat, Oct 19, 2019 at 12:46:56AM -0400, Jason Merrill wrote: > > gcc/testsuite/g++.dg/cpp2a > > * nodiscard-construct.C: New test. > > * nodiscard-once.C: New test. > > * nodiscard-reason-non

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-19 Thread Jakub Jelinek
Hi! On Sat, Oct 19, 2019 at 12:46:56AM -0400, Jason Merrill wrote: > gcc/testsuite/g++.dg/cpp2a > * nodiscard-construct.C: New test. > * nodiscard-once.C: New test. > * nodiscard-reason-nonstring.C: New test. > * nodiscard-reason-only-one.C: New

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-18 Thread Jason Merrill
On 10/18/19 1:54 AM, JeanHeyd Meneide wrote: ... And I am very tired and forgot to attach the patch. Again. Sorry...! On Fri, Oct 18, 2019 at 1:54 AM JeanHeyd Meneide wrote: Dear Jason, On Thu, Oct 17, 2019 at 3:51 PM Jason Merrill wrote: > FAIL: g++.dg/cpp0x/gen-attrs-67.C -std=c++11

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-17 Thread JeanHeyd Meneide
... And I am very tired and forgot to attach the patch. Again. Sorry...! On Fri, Oct 18, 2019 at 1:54 AM JeanHeyd Meneide wrote: > > Dear Jason, > > On Thu, Oct 17, 2019 at 3:51 PM Jason Merrill wrote: > > > FAIL: g++.dg/cpp0x/gen-attrs-67.C -std=c++11 (test for errors, line 8) > > > FAIL: g

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-17 Thread JeanHeyd Meneide
Dear Jason, On Thu, Oct 17, 2019 at 3:51 PM Jason Merrill wrote: > > FAIL: g++.dg/cpp0x/gen-attrs-67.C -std=c++11 (test for errors, line 8) > > FAIL: g++.dg/cpp1z/feat-cxx1z.C -std=gnu++17 (test for excess errors) > > FAIL: g++.dg/cpp1z/nodiscard4.C -std=c++11 (test for excess errors) > >

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-17 Thread Jason Merrill
On 10/17/19 3:12 PM, JeanHeyd Meneide wrote: * tree.c (handle_nodiscard_attribute): Implements p1301 [[nodiscard("should have a reason")]]. This should be a heading at the top rather than specific to this file/function. It looks like you didn't run the testsuite, I'm seei

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-17 Thread JeanHeyd Meneide
2019-10-17 JeanHeyd Meneide gcc/ * escaped_string.h (escaped_string): New header. * tree.c (escaped_string): Remove escaped_string class. gcc/c-family * c-lex.c (c_common_has_attribute): Update attribute value. gcc/cp/ * tree.c (handle_nodiscard_attribute):

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-17 Thread Jakub Jelinek
On Thu, Oct 17, 2019 at 02:38:32PM -0400, Jason Merrill wrote: > On 10/16/19 5:36 PM, JeanHeyd Meneide wrote: > > Thanks, Jason! I fixed those last things and I put the changelog below > > in the e-mail. I'll figure out how to write a good changelog in a > > commit message on the command line soon.

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-17 Thread Jason Merrill
On 10/16/19 5:36 PM, JeanHeyd Meneide wrote: Thanks, Jason! I fixed those last things and I put the changelog below in the e-mail. I'll figure out how to write a good changelog in a commit message on the command line soon. :D In the e-mail like this is fine, thanks. 2019-10-16 JeanHeyd Menei

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-16 Thread JeanHeyd Meneide
Thanks, Jason! I fixed those last things and I put the changelog below in the e-mail. I'll figure out how to write a good changelog in a commit message on the command line soon. :D 2019-10-16 JeanHeyd Meneide gcc/ * escaped_string.h: New. Refactored out of tree.c

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-16 Thread Jason Merrill
On 10/15/19 8:31 PM, JeanHeyd Meneide wrote: Attached is a patch for p1301 that improves in the way Jason Merrill specified earlier (https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00858.html) Great, thanks! This mail is missing ChangeLog entries. My guess is that you're using git diff to crea

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-16 Thread JeanHeyd Meneide
Dear Dave, Thanks for sharing all of that! It was very helpful to read it over again, and it was helpful in IRC yesterday. As a bit of a "that was strange" moment, I ran the builds again and did NOT do --disable-bootstrap with the patch on a different machine. They built and ran fine, w

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-16 Thread David Malcolm
On Tue, 2019-10-15 at 20:31 -0400, JeanHeyd Meneide wrote: > Attached is a patch for p1301 that improves in the way Jason Merrill > specified earlier > (https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00858.html), but it > keeps segfaulting on my build of GCC. I don't know what changes I've > made th

Re: [ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-15 Thread JeanHeyd Meneide
I am also not very smart, wherein I attach patches that do not have the tests. Sorry! diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c index e3c602fbb8d..fb05b5f8af0 100644 --- a/gcc/c-family/c-lex.c +++ b/gcc/c-family/c-lex.c @@ -353,13 +353,14 @@ c_common_has_attribute (cpp_reader *pfile

[ C++ ] [ PATCH ] [ RFC ] p1301 - [[nodiscard("should have a reason")]]

2019-10-15 Thread JeanHeyd Meneide
Attached is a patch for p1301 that improves in the way Jason Merrill specified earlier (https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00858.html), but it keeps segfaulting on my build of GCC. I don't know what changes I've made that cause it to segfault: it does so whenever the error() function is