[Bug c++/90455] braced-init and incomplete type instantiation

2019-07-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90455

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marek Polacek  ---
Fixed.

[Bug c++/90455] braced-init and incomplete type instantiation

2019-07-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90455

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Wed Jul 17 18:10:14 2019
New Revision: 273553

URL: https://gcc.gnu.org/viewcvs?rev=273553=gcc=rev
Log:
PR c++/90455
* g++.dg/cpp0x/nsdmi-list6.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/nsdmi-list6.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/91104] auto... in lambda expression reorders parameters

2019-07-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91104

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-07-17
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Marek Polacek  ---
But the testcase is useful.

[Bug c++/91104] auto... in lambda expression reorders parameters

2019-07-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91104

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
Seems to be fixed by

commit 3a9560cbae7f59d5b280a7858bdb150e27d447ad
Author: mpolacek 
Date:   Tue May 28 14:00:29 2019 +

PR c++/90548 - ICE with generic lambda and empty pack.
* pt.c (tsubst_copy_and_build): Handle pack expansion properly.

* g++.dg/cpp1y/lambda-generic-90548.C: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271705
138bc75d-0d04-0410-961f-82ee72b054a4

$ xg++ 91104.C ; ./a.out 
1 2 3
1 2 3

[Bug c++/86375] Lambda call in template parameter causes compile time error

2019-07-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86375

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Marek Polacek  ---
Actually, we seem to have a pretty much identical testcase (e.g.
lambda-uneval7.C), so I'll just mark it as fixed.

Fixed by r266056, for the record.

[Bug c++/91120] broken template instantiation for std::string_view values

2019-07-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91120

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
I'm not sure if this is valid.  http://eel.is/c++draft/temp.arg.nontype#4 says
A string literal ([lex.string]) is not an acceptable template-argument for a
template-parameter of non-class type.
but given the sv suffix, the argument should be of type
basic_string_view, and thus valid?

[Bug c++/86375] Lambda call in template parameter causes compile time error

2019-07-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86375

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-07-12
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Marek Polacek  ---
Will do.

[Bug c++/89906] [8 Regression] template template parameter redeclared

2019-07-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89906

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

--- Comment #6 from Marek Polacek  ---
We need to backport PR86098 to gcc-8-branch.

[Bug c++/91110] [10 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in cp_omp_mappable_type_1, at cp/decl2.c:1421

2019-07-10 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91110

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #4 from Marek Polacek  ---
So fixed?

[Bug middle-end/91049] wrong location in -Wreturn-local-addr for a return throw

2019-07-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91049

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org
  Component|c++ |middle-end

--- Comment #1 from Marek Polacek  ---
This warning is generated in gimple-ssa-isolate-paths.c.

[Bug c++/56248] [DR 580] access checking of template parameters done too early

2019-07-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56248

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-06
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug c++/67017] [DR1265] Mixing init-declarator for variables and functions in declaration with auto type-specifier

2019-07-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67017

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||mpolacek at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #7 from Marek Polacek  ---
Resolved in r244071.

[Bug c++/91098] [10 Regression] internal compiler error: tree check: expected var_decl or field_decl or function_decl or type_decl or template_decl, have using_decl in build_deduction_guide, at cp/pt.

2019-07-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91098

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-07-06
 CC||mpolacek at gcc dot gnu.org
   Target Milestone|--- |10.0
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Started with r270765.

[Bug c++/91095] internal compiler error: in tsubst_copy

2019-07-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91095

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2019-07-05
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
It's fine if you don't have a minimal testcase, but please provide the
preprocessed source file (using -save-temps).

[Bug c++/83374] [DR1813] Bad std::is_standard_layout with two base class subobjects of the same type

2019-07-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83374

--- Comment #7 from Marek Polacek  ---
Related PRs:
PR91079
PR91080
PR91081

[Bug c++/83374] [DR1813] Bad std::is_standard_layout with two base class subobjects of the same type

2019-07-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83374

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Marek Polacek  ---
Fixed for GCC 10.

[Bug c++/83374] [DR1813] Bad std::is_standard_layout with two base class subobjects of the same type

2019-07-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83374

--- Comment #5 from Marek Polacek  ---
Author: mpolacek
Date: Fri Jul  5 14:45:30 2019
New Revision: 273139

URL: https://gcc.gnu.org/viewcvs?rev=273139=gcc=rev
Log:
DR 1813
PR c++/83374 - __is_standard_layout wrong for a class with repeated
bases.
* class.c (check_bases): Set CLASSTYPE_NON_STD_LAYOUT for a class if
CLASSTYPE_REPEATED_BASE_P is true.

* g++.dg/ext/is_std_layout3.C: New test.
* g++.dg/ext/is_std_layout4.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/ext/is_std_layout3.C
trunk/gcc/testsuite/g++.dg/ext/is_std_layout4.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/83374] [DR1813] Bad std::is_standard_layout with two base class subobjects of the same type

2019-07-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83374

Marek Polacek  changed:

   What|Removed |Added

   Keywords||accepts-invalid, patch,
   ||rejects-valid

--- Comment #4 from Marek Polacek  ---
https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00304.html

[Bug c++/91081] New: [DR 2120] Array as first non-static data member in standard-layout class

2019-07-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91081

Bug ID: 91081
   Summary: [DR 2120] Array as first non-static data member in
standard-layout class
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

Cf. https://wg21.link/cwg2120

Test:

struct A {};
struct B : A {};
struct C { A a; };
struct D { C c[5]; };
struct E : B { D d; };
static_assert(__is_standard_layout(B), "");
static_assert(__is_standard_layout(D), "");
static_assert(!__is_standard_layout(E), "");

[Bug c++/91080] New: [DR 1672] Layout compatibility with multiple empty bases

2019-07-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91080

Bug ID: 91080
   Summary: [DR 1672] Layout compatibility with multiple empty
bases
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

Cf. https://wg21.link/cwg1672

Test (from the clang testsuite):

struct Empty {};
struct A : Empty {};
struct B { Empty e; };
struct C : A { B b; int n; };
struct D : A { int n; B b; };

static_assert(!__is_standard_layout(C), "");
static_assert(__is_standard_layout(D), "");

struct E { B b; int n; };
struct F { int n; B b; };
union G { B b; int n; };
union H { int n; B b; };

struct X {};
template struct Y : X, A { T t; };

static_assert(!__is_standard_layout(Y), "");
static_assert(__is_standard_layout(Y), "");
static_assert(!__is_standard_layout(Y), "");
static_assert(!__is_standard_layout(Y), "");
static_assert(!__is_standard_layout(Y), "");

[Bug c++/91079] New: [DR 1881] Standard-layout classes and unnamed bit-fields

2019-07-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91079

Bug ID: 91079
   Summary: [DR 1881] Standard-layout classes and unnamed
bit-fields
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

Cf. https://wg21.link/cwg1881

Test:

struct A { int a : 4; };
struct B : A { int b : 3; };
static_assert(__is_standard_layout(A), "");
static_assert(!__is_standard_layout(B), "");

struct C { int : 0; };
struct D : C { int : 0; };
static_assert(__is_standard_layout(C), "");
static_assert(!__is_standard_layout(D), "");

[Bug c++/91064] __is_standard_layout incorrect for a class with multiple bases

2019-07-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91064

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek  ---
Note the testcase here is actually wrong; U *is* a standard-layout class.  The
standard has a different test.

[Bug c++/83374] [DR1813] Bad std::is_standard_layout with two base class subobjects of the same type

2019-07-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83374

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

--- Comment #3 from Marek Polacek  ---
Clang 7 and newer now implement DR 1813.  I'll take a look.

[Bug c++/91051] [9/10 Regression] Templated conversion operator to rvalue reference to constant don't match when converting to lvalue reference to constant

2019-07-02 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91051

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
Changed in r269602.

[Bug c++/90490] [9 Regression] ICE on noexcept with decltype expression

2019-07-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90490

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Marek Polacek  ---
Fixed.

[Bug c++/60223] [c++11] ICE with C++11-style default template parameter

2019-07-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60223

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Marek Polacek  ---
Fixed.

[Bug c++/90490] [9 Regression] ICE on noexcept with decltype expression

2019-07-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90490

--- Comment #8 from Marek Polacek  ---
Author: mpolacek
Date: Tue Jul  2 00:23:41 2019
New Revision: 272918

URL: https://gcc.gnu.org/viewcvs?rev=272918=gcc=rev
Log:
PR c++/90490 - fix decltype issues in noexcept-specifier.
* except.c (build_noexcept_spec): Call
instantiate_non_dependent_expr_sfinae before
build_converted_constant_expr instead of calling
instantiate_non_dependent_expr after it.  Add
processing_template_decl_sentinel.

* g++.dg/cpp0x/noexcept43.C: New test.
* g++.dg/cpp0x/noexcept44.C: New test.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/noexcept43.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/noexcept44.C
Modified:
branches/gcc-9-branch/gcc/cp/ChangeLog
branches/gcc-9-branch/gcc/cp/except.c

[Bug c++/60223] [c++11] ICE with C++11-style default template parameter

2019-07-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60223

--- Comment #9 from Marek Polacek  ---
Author: mpolacek
Date: Tue Jul  2 00:22:37 2019
New Revision: 272917

URL: https://gcc.gnu.org/viewcvs?rev=272917=gcc=rev
Log:
PR c++/60223 - ICE with T{} in non-deduced context.
* pt.c (unify): Allow COMPOUND_LITERAL_P in a non-deduced context.

* g++.dg/cpp0x/nondeduced1.C: New test.
* g++.dg/cpp0x/nondeduced2.C: New test.
* g++.dg/cpp0x/nondeduced3.C: New test.
* g++.dg/cpp0x/nondeduced4.C: New test.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/nondeduced1.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/nondeduced2.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/nondeduced3.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/nondeduced4.C
Modified:
branches/gcc-9-branch/gcc/cp/ChangeLog
branches/gcc-9-branch/gcc/cp/pt.c

[Bug c++/91040] [9/10 Regression] Incorrect "invalid use of non-lvalue array" error in conditional assignment with throw

2019-07-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91040

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek  ---
So another dup of 90393.

[Bug c++/90393] [9/10 Regression] ICE in return statement with a conditional operator, one of the second and third arguments is throw, and the other is a const variable of a class with a nontrivial co

2019-06-29 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90393

Marek Polacek  changed:

   What|Removed |Added

 CC||doko at debian dot org

--- Comment #6 from Marek Polacek  ---
*** Bug 91032 has been marked as a duplicate of this bug. ***

[Bug c++/91032] [9/10 Regression] ICE in ocp_convert, at cp/cvt.c:766

2019-06-29 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91032

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||mpolacek at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #3 from Marek Polacek  ---
Started with r260272; most likely a dup.

*** This bug has been marked as a duplicate of bug 90393 ***

[Bug c++/90966] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:16155

2019-06-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90966

Marek Polacek  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Target Milestone|--- |9.2

[Bug c++/90966] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:16155

2019-06-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90966

--- Comment #2 from Marek Polacek  ---
Started with r263511.

[Bug c++/90966] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:16155

2019-06-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90966

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-06-23
 CC||mpolacek at gcc dot gnu.org
Summary|ICE in tsubst_copy, at  |[9/10 Regression] ICE in
   |cp/pt.c:16155   |tsubst_copy, at
   ||cp/pt.c:16155
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.

[Bug c++/90965] New: Improve diagnostic for out-of-line constructor

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90965

Bug ID: 90965
   Summary: Improve diagnostic for out-of-line constructor
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

See <https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00252.html>.

[Bug c++/90455] braced-init and incomplete type instantiation

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90455

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-06-22
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
 Ever confirmed|0   |1

[Bug c++/90455] braced-init and incomplete type instantiation

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90455

--- Comment #2 from Marek Polacek  ---
Fixed (by r272287 I suspect).

[Bug c++/58836] [c++11] ICE with wrong usage of initializer list in non-type template argument

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58836

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marek Polacek  ---
Fixed by r272571.  Test added.

[Bug c++/65707] internal compiler error: in unify, at cp/pt.c:18577

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65707

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Marek Polacek  ---
Fixed by r272571.  Test added.

[Bug c++/89480] internal compiler error: in unify, at cp/pt.c:22160 with the template argument force conversion

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89480

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Marek Polacek  ---
Fixed by r272571.  Test added.

[Bug c++/65707] internal compiler error: in unify, at cp/pt.c:18577

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65707

--- Comment #5 from Marek Polacek  ---
Author: mpolacek
Date: Sat Jun 22 16:29:06 2019
New Revision: 272589

URL: https://gcc.gnu.org/viewcvs?rev=272589=gcc=rev
Log:
PR c++/65707
PR c++/89480
PR c++/58836
* g++.dg/cpp0x/nondeduced5.C: New test.
* g++.dg/cpp0x/nondeduced6.C: New test.
* g++.dg/cpp0x/nondeduced7.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced5.C
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced6.C
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced7.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/58836] [c++11] ICE with wrong usage of initializer list in non-type template argument

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58836

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Sat Jun 22 16:29:06 2019
New Revision: 272589

URL: https://gcc.gnu.org/viewcvs?rev=272589=gcc=rev
Log:
PR c++/65707
PR c++/89480
PR c++/58836
* g++.dg/cpp0x/nondeduced5.C: New test.
* g++.dg/cpp0x/nondeduced6.C: New test.
* g++.dg/cpp0x/nondeduced7.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced5.C
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced6.C
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced7.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/89480] internal compiler error: in unify, at cp/pt.c:22160 with the template argument force conversion

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89480

--- Comment #5 from Marek Polacek  ---
Author: mpolacek
Date: Sat Jun 22 16:29:06 2019
New Revision: 272589

URL: https://gcc.gnu.org/viewcvs?rev=272589=gcc=rev
Log:
PR c++/65707
PR c++/89480
PR c++/58836
* g++.dg/cpp0x/nondeduced5.C: New test.
* g++.dg/cpp0x/nondeduced6.C: New test.
* g++.dg/cpp0x/nondeduced7.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced5.C
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced6.C
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced7.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/66256] noexcept evaluation done before end of class

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #14 from Marek Polacek  ---
Fixed by r272586.

[Bug c++/66256] noexcept evaluation done before end of class

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256

--- Comment #13 from Marek Polacek  ---
Author: mpolacek
Date: Sat Jun 22 15:51:49 2019
New Revision: 272588

URL: https://gcc.gnu.org/viewcvs?rev=272588=gcc=rev
Log:
PR c++/66256
* g++.dg/cpp0x/noexcept54.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept54.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/90537] Implement P1286R2, Contra CWG DR1778

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90537
Bug 90537 depends on bug 86476, which changed state.

Bug 86476 Summary: Members declared later in a class appear to be unavailable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86476

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

[Bug c++/52869] [DR 1207] "this" not being allowed in noexcept clauses

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52869

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #19 from Marek Polacek  ---
Fixed.

[Bug c++/86476] Members declared later in a class appear to be unavailable

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86476

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marek Polacek  ---
Fixed.

[Bug c++/52869] [DR 1207] "this" not being allowed in noexcept clauses

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52869

--- Comment #18 from Marek Polacek  ---
Author: mpolacek
Date: Sat Jun 22 15:14:30 2019
New Revision: 272586

URL: https://gcc.gnu.org/viewcvs?rev=272586=gcc=rev
Log:
PR c++/86476 - noexcept-specifier is a complete-class context.
PR c++/52869
* cp-tree.def (DEFAULT_ARG): Update commentary.
* cp-tree.h (UNPARSED_NOEXCEPT_SPEC_P): New macro.
(tree_default_arg): Use tree_base instead of tree_common.
(do_push_parm_decls, maybe_check_overriding_exception_spec): Declare.
* decl.c (do_push_parm_decls): New function, broken out of...
(store_parm_decls): ...here.  Call it.
* except.c (nothrow_spec_p): Accept DEFAULT_ARG in the assert.
* parser.c (cp_parser_noexcept_specification_opt,
cp_parser_late_noexcept_specifier, noexcept_override_late_checks):
Forward-declare.
(unparsed_noexcepts): New macro.
(push_unparsed_function_queues): Update initializer.
(cp_parser_direct_declarator): Pass FRIEND_P to
cp_parser_exception_specification_opt.
(inject_parm_decls): New.
(pop_injected_parms): New.
(cp_parser_class_specifier_1): Implement delayed parsing of
noexcept-specifiers.
(cp_parser_save_noexcept): New.
(cp_parser_late_noexcept_specifier): New.
(noexcept_override_late_checks): New.
(cp_parser_noexcept_specification_opt): Add FRIEND_P parameter.  Call
cp_parser_save_noexcept instead of the normal processing if needed.
(cp_parser_exception_specification_opt): Add FRIEND_P parameter and
pass it to cp_parser_noexcept_specification_opt.
(cp_parser_save_member_function_body): Fix comment.
(cp_parser_save_default_args): Maybe save the noexcept-specifier to
post process.
(cp_parser_transaction): Update call to
cp_parser_noexcept_specification_opt.
(cp_parser_transaction_expression): Likewise.
* parser.h (cp_unparsed_functions_entry): Add new field to carry
a noexcept-specifier.
* pt.c (dependent_type_p_r): Handle unparsed noexcept expression.
* search.c (maybe_check_overriding_exception_spec): New function,
broken
out of...
(check_final_overrider): ...here.  Call
maybe_check_overriding_exception_spec.
* tree.c (canonical_eh_spec): Handle UNPARSED_NOEXCEPT_SPEC_P.
(cp_tree_equal): Handle DEFAULT_ARG.

* g++.dg/cpp0x/noexcept45.C: New test.
* g++.dg/cpp0x/noexcept46.C: New test.
* g++.dg/cpp0x/noexcept47.C: New test.
* g++.dg/cpp0x/noexcept48.C: New test.
* g++.dg/cpp0x/noexcept49.C: New test.
* g++.dg/cpp0x/noexcept50.C: New test.
* g++.dg/cpp0x/noexcept51.C: New test.
* g++.dg/cpp0x/noexcept52.C: New test.
* g++.dg/cpp0x/noexcept53.C: New test.
* g++.dg/eh/shadow1.C: Adjust dg-error.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept45.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept46.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept47.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept48.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept49.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept50.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept51.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept52.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept53.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.def
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/except.c
trunk/gcc/cp/parser.c
trunk/gcc/cp/parser.h
trunk/gcc/cp/pt.c
trunk/gcc/cp/search.c
trunk/gcc/cp/tree.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/eh/shadow1.C

[Bug c++/86476] Members declared later in a class appear to be unavailable

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86476

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Sat Jun 22 15:14:30 2019
New Revision: 272586

URL: https://gcc.gnu.org/viewcvs?rev=272586=gcc=rev
Log:
PR c++/86476 - noexcept-specifier is a complete-class context.
PR c++/52869
* cp-tree.def (DEFAULT_ARG): Update commentary.
* cp-tree.h (UNPARSED_NOEXCEPT_SPEC_P): New macro.
(tree_default_arg): Use tree_base instead of tree_common.
(do_push_parm_decls, maybe_check_overriding_exception_spec): Declare.
* decl.c (do_push_parm_decls): New function, broken out of...
(store_parm_decls): ...here.  Call it.
* except.c (nothrow_spec_p): Accept DEFAULT_ARG in the assert.
* parser.c (cp_parser_noexcept_specification_opt,
cp_parser_late_noexcept_specifier, noexcept_override_late_checks):
Forward-declare.
(unparsed_noexcepts): New macro.
(push_unparsed_function_queues): Update initializer.
(cp_parser_direct_declarator): Pass FRIEND_P to
cp_parser_exception_specification_opt.
(inject_parm_decls): New.
(pop_injected_parms): New.
(cp_parser_class_specifier_1): Implement delayed parsing of
noexcept-specifiers.
(cp_parser_save_noexcept): New.
(cp_parser_late_noexcept_specifier): New.
(noexcept_override_late_checks): New.
(cp_parser_noexcept_specification_opt): Add FRIEND_P parameter.  Call
cp_parser_save_noexcept instead of the normal processing if needed.
(cp_parser_exception_specification_opt): Add FRIEND_P parameter and
pass it to cp_parser_noexcept_specification_opt.
(cp_parser_save_member_function_body): Fix comment.
(cp_parser_save_default_args): Maybe save the noexcept-specifier to
post process.
(cp_parser_transaction): Update call to
cp_parser_noexcept_specification_opt.
(cp_parser_transaction_expression): Likewise.
* parser.h (cp_unparsed_functions_entry): Add new field to carry
a noexcept-specifier.
* pt.c (dependent_type_p_r): Handle unparsed noexcept expression.
* search.c (maybe_check_overriding_exception_spec): New function,
broken
out of...
(check_final_overrider): ...here.  Call
maybe_check_overriding_exception_spec.
* tree.c (canonical_eh_spec): Handle UNPARSED_NOEXCEPT_SPEC_P.
(cp_tree_equal): Handle DEFAULT_ARG.

* g++.dg/cpp0x/noexcept45.C: New test.
* g++.dg/cpp0x/noexcept46.C: New test.
* g++.dg/cpp0x/noexcept47.C: New test.
* g++.dg/cpp0x/noexcept48.C: New test.
* g++.dg/cpp0x/noexcept49.C: New test.
* g++.dg/cpp0x/noexcept50.C: New test.
* g++.dg/cpp0x/noexcept51.C: New test.
* g++.dg/cpp0x/noexcept52.C: New test.
* g++.dg/cpp0x/noexcept53.C: New test.
* g++.dg/eh/shadow1.C: Adjust dg-error.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept45.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept46.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept47.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept48.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept49.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept50.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept51.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept52.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept53.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.def
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/except.c
trunk/gcc/cp/parser.c
trunk/gcc/cp/parser.h
trunk/gcc/cp/pt.c
trunk/gcc/cp/search.c
trunk/gcc/cp/tree.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/eh/shadow1.C

[Bug c++/90881] -Wunused-value false positive in SFINAE context

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90881

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Marek Polacek  ---
Fixed.  The behavior is now asi outlined in Comment 5.

[Bug c/89180] [meta-bug] bogus/missing -Wunused warnings

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89180
Bug 89180 depends on bug 90881, which changed state.

Bug 90881 Summary: -Wunused-value false positive in SFINAE context
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90881

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

[Bug c++/90881] -Wunused-value false positive in SFINAE context

2019-06-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90881

--- Comment #7 from Marek Polacek  ---
Author: mpolacek
Date: Sat Jun 22 14:43:00 2019
New Revision: 272585

URL: https://gcc.gnu.org/viewcvs?rev=272585=gcc=rev
Log:
PR c++/90881 - bogus -Wunused-value in unevaluated context.
* cvt.c (convert_to_void): Don't emit unused warnings in
an unevaluated context.

* g++.dg/cpp0x/Wunused-value1.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/Wunused-value1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cvt.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/61490] accepts-invalid: qualified-name in friend function definition

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61490

--- Comment #2 from Marek Polacek  ---
Author: mpolacek
Date: Fri Jun 21 20:43:47 2019
New Revision: 272572

URL: https://gcc.gnu.org/viewcvs?rev=272572=gcc=rev
Log:
PR c++/61490 - qualified-id in friend function definition.
* decl.c (grokdeclarator): Diagnose qualified-id in friend function
definition.  Improve location for diagnostics of friend functions.

* g++.dg/diagnostic/friend2.C: New test.
* g++.dg/diagnostic/friend3.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/diagnostic/friend2.C
trunk/gcc/testsuite/g++.dg/diagnostic/friend3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/61490] accepts-invalid: qualified-name in friend function definition

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61490

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Marek Polacek  ---
Fixed.

[Bug c++/60223] [c++11] ICE with C++11-style default template parameter

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60223

--- Comment #8 from Marek Polacek  ---
Fixed on trunk but I'll leave it open because I want to fix it for 9.2 also.

[Bug c++/60223] [c++11] ICE with C++11-style default template parameter

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60223

--- Comment #7 from Marek Polacek  ---
Author: mpolacek
Date: Fri Jun 21 20:32:06 2019
New Revision: 272571

URL: https://gcc.gnu.org/viewcvs?rev=272571=gcc=rev
Log:
PR c++/60223 - ICE with T{} in non-deduced context.
* pt.c (unify): Allow COMPOUND_LITERAL_P in a non-deduced context.

* g++.dg/cpp0x/nondeduced1.C: New test.
* g++.dg/cpp0x/nondeduced2.C: New test.
* g++.dg/cpp0x/nondeduced3.C: New test.
* g++.dg/cpp0x/nondeduced4.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced1.C
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced2.C
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced3.C
trunk/gcc/testsuite/g++.dg/cpp0x/nondeduced4.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/64235] Internal compiler error (Segmentation fault)

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64235

--- Comment #4 from Marek Polacek  ---
Author: mpolacek
Date: Fri Jun 21 20:26:54 2019
New Revision: 272570

URL: https://gcc.gnu.org/viewcvs?rev=272570=gcc=rev
Log:
PR c++/64235 - missing syntax error with invalid alignas.
* parser.c (cp_parser_std_attribute_spec): Commit to tentative parse
if there's a missing close paren.

* g++.dg/parse/alignas1.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/parse/alignas1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/64235] Internal compiler error (Segmentation fault)

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64235

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Marek Polacek  ---
Fixed.

[Bug c++/90490] [9 Regression] ICE on noexcept with decltype expression

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90490

Marek Polacek  changed:

   What|Removed |Added

Summary|[9/10 Regression] ICE on|[9 Regression] ICE on
   |noexcept with decltype  |noexcept with decltype
   |expression  |expression

--- Comment #7 from Marek Polacek  ---
Fixed on trunk so far.

[Bug c++/90490] [9/10 Regression] ICE on noexcept with decltype expression

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90490

--- Comment #6 from Marek Polacek  ---
Author: mpolacek
Date: Fri Jun 21 20:19:24 2019
New Revision: 272568

URL: https://gcc.gnu.org/viewcvs?rev=272568=gcc=rev
Log:
PR c++/90490 - fix decltype issues in noexcept-specifier.
* except.c (build_noexcept_spec): Call
instantiate_non_dependent_expr_sfinae before
build_converted_constant_expr instead of calling
instantiate_non_dependent_expr after it.  Add
processing_template_decl_sentinel.

* g++.dg/cpp0x/noexcept43.C: New test.
* g++.dg/cpp0x/noexcept44.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept43.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept44.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/except.c
trunk/gcc/testsuite/ChangeLog

[Bug other/44209] [meta-bug] Some warnings are not linked to diagnostics options

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44209
Bug 44209 depends on bug 90875, which changed state.

Bug 90875 Summary: warnings about switch values outside range don't have 
associated option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90875

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

[Bug c++/90875] warnings about switch values outside range don't have associated option

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90875

Marek Polacek  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #3 from Marek Polacek  ---
You forgot to add the new tests.

[Bug c++/90961] New: awful diagnostics for noexcept-expression with type name

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90961

Bug ID: 90961
   Summary: awful diagnostics for noexcept-expression with type
name
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

For

static_assert(noexcept(void));

we generate a host of bogus errors:

q2.C:1:24: error: expected primary-expression before ‘void’
1 | static_assert(noexcept(void));
  |^~~~
q2.C:1:24: error: expected ‘)’ before ‘void’
1 | static_assert(noexcept(void));
  |   ~^~~~
  |)
q2.C:1:24: error: expected ‘,’ before ‘void’
1 | static_assert(noexcept(void));
  |^~~~
  |,
q2.C:1:24: error: expected string-literal before ‘void’
1 | static_assert(noexcept(void));
  |^~~~
q2.C:1:24: error: expected ‘)’ before ‘void’
1 | static_assert(noexcept(void));
  |  ~ ^~~~
  |)
q2.C:1:29: error: expected ‘;’ before ‘)’ token
1 | static_assert(noexcept(void));
  | ^
  | ;
q2.C:1:29: error: expected unqualified-id before ‘)’ token

Instead, we should generate one error saying something like "type names not
allowed".

[Bug c++/90731] [9/10 Regression] noexcept broken for forward declarations with decltype

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90731

--- Comment #3 from Marek Polacek  ---
And using typedef:

typedef void T() noexcept(true);
T t;
void t() noexcept(true);

[Bug c++/90731] [9/10 Regression] noexcept broken for forward declarations with decltype

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90731

--- Comment #2 from Marek Polacek  ---
This test using using should compile in c++17:

using T = void() noexcept(true);
T t;
void t() noexcept(true);

[Bug c++/78722] noexcept and function pointers

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78722

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
This is accepted with both -std=c++14 and c++17.

[Bug c++/90960] declaring a member function with a computed typedef is confused as a data member definition

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90960

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
The second problem is, I think, essentially a dup of 90731.

[Bug c++/49332] [C++0x] noexcept ignored on function pointer

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49332

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek  ---
This still compiles without errors in C++11, but in C++17:

49332.C:4:24: error: invalid conversion from ‘void (*)()’ to ‘void (*)()
noexcept’ [-fpermissive]
4 | void (*p)() noexcept = f; // { dg-error "" }
  |^
  ||
  |void (*)()

[Bug c++/90953] [10 Regression] ICE: tree check: expected identifier_node, have tree_list in is_attribute_p, at attribs.h:155 since r272486

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90953

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marek Polacek  ---
Fixed.

[Bug c++/90953] [10 Regression] ICE: tree check: expected identifier_node, have tree_list in is_attribute_p, at attribs.h:155 since r272486

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90953

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Fri Jun 21 14:41:22 2019
New Revision: 272552

URL: https://gcc.gnu.org/viewcvs?rev=272552=gcc=rev
Log:
PR c++/90953 - ICE with -Wmissing-format-attribute.
* c-common.c (check_function_arguments_recurse): Use
get_attribute_name.
(check_missing_format_attribute): Likewise.

* g++.dg/warn/miss-format-7.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/warn/miss-format-7.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/90953] [10 Regression] ICE: tree check: expected identifier_node, have tree_list in is_attribute_p, at attribs.h:155 since r272486

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90953

--- Comment #2 from Marek Polacek  ---
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -7601,13 +7601,13 @@ check_missing_format_attribute (tree ltype, tree rtype)
   tree ra;

   for (ra = TYPE_ATTRIBUTES (ttr); ra; ra = TREE_CHAIN (ra))
-if (is_attribute_p ("format", TREE_PURPOSE (ra)))
+if (is_attribute_p ("format", get_attribute_name (ra)))
   break;
   if (ra)
 {
   tree la;
   for (la = TYPE_ATTRIBUTES (ttl); la; la = TREE_CHAIN (la))
-   if (is_attribute_p ("format", TREE_PURPOSE (la)))
+   if (is_attribute_p ("format", get_attribute_name (la)))
  break;
   return !la;
 }

[Bug c++/90953] [10 Regression] ICE: tree check: expected identifier_node, have tree_list in is_attribute_p, at attribs.h:155 since r272486

2019-06-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90953

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

[Bug c++/88853] ICE: verify_type failed (error: type variant differs by TYPE_PACKED)

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88853

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-06-20
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Marek Polacek  ---
Confirmed with gcc version 10.0.0 20190620 (experimental) (GCC):

88853.C: In instantiation of ‘class yp >’:
88853.C:15:7:   required from ‘class n1 >’
88853.C:21:7:   required from ‘class c4 >’
88853.C:33:7:   required from ‘class hb >’
88853.C:45:7:   required from ‘class fd’
88853.C:52:7:   required from ‘class dh > >’
88853.C:17:22:   required from ‘class n1 > >’
88853.C:57:19:   required from here
88853.C:26:7: error: type variant differs by TYPE_PACKED
   26 | class yp
  |   ^~
 
full-name "class fd"
no-binfo use_template=1 interface-unknown
chain >
 
full-name "const class fd"
no-binfo use_template=1 interface-unknown>
88853.C:26:7: internal compiler error: ‘verify_type’ failed
0x182ff70 verify_type(tree_node const*)
/home/mpolacek/src/gcc/gcc/tree.c:14650
0xe2127e gen_type_die_with_usage
/home/mpolacek/src/gcc/gcc/dwarf2out.c:25557
0xe21eb1 gen_type_die
/home/mpolacek/src/gcc/gcc/dwarf2out.c:25787
0xe23b4c gen_decl_die
/home/mpolacek/src/gcc/gcc/dwarf2out.c:26380
0xe1fffc gen_member_die
/home/mpolacek/src/gcc/gcc/dwarf2out.c:25241
0xe20749 gen_struct_or_union_type_die
/home/mpolacek/src/gcc/gcc/dwarf2out.c:25337
0xe21211 gen_tagged_type_die
/home/mpolacek/src/gcc/gcc/dwarf2out.c:25538
0xe21b2b gen_type_die_with_usage
/home/mpolacek/src/gcc/gcc/dwarf2out.c:25733
0xe21eb1 gen_type_die
/home/mpolacek/src/gcc/gcc/dwarf2out.c:25787
0xe23df2 gen_decl_die
/home/mpolacek/src/gcc/gcc/dwarf2out.c:26419
0xe252ee dwarf2out_decl
/home/mpolacek/src/gcc/gcc/dwarf2out.c:26964
0xe24772 dwarf2out_type_decl
/home/mpolacek/src/gcc/gcc/dwarf2out.c:26691
0x127930d rest_of_type_compilation(tree_node*, int)
/home/mpolacek/src/gcc/gcc/passes.c:339
0x8a57a6 finish_struct_1(tree_node*)
/home/mpolacek/src/gcc/gcc/cp/class.c:7091
0xab7d6c instantiate_class_template_1
/home/mpolacek/src/gcc/gcc/cp/pt.c:11495
0xab7ee2 instantiate_class_template(tree_node*)
/home/mpolacek/src/gcc/gcc/cp/pt.c:11534
0xb845c2 complete_type(tree_node*)
/home/mpolacek/src/gcc/gcc/cp/typeck.c:139
0xb845e7 complete_type_or_maybe_complain(tree_node*, tree_node*, int)
/home/mpolacek/src/gcc/gcc/cp/typeck.c:151
0xb84685 complete_type_or_else(tree_node*, tree_node*)
/home/mpolacek/src/gcc/gcc/cp/typeck.c:168
0x94ccfd xref_basetypes(tree_node*, tree_node*)
/home/mpolacek/src/gcc/gcc/cp/decl.c:14310
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

[Bug c++/79781] ICE on valid C++ code with -std=c++14 (in assemble_integer, at varasm.c:2733)

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79781

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Marek Polacek  ---
Fixed.

[Bug c++/79781] ICE on valid C++ code with -std=c++14 (in assemble_integer, at varasm.c:2733)

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79781

--- Comment #7 from Marek Polacek  ---
Author: mpolacek
Date: Thu Jun 20 22:35:34 2019
New Revision: 272527

URL: https://gcc.gnu.org/viewcvs?rev=272527=gcc=rev
Log:
PR c++/79781
* g++.dg/ext/goto1.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/ext/goto1.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/79781] ICE on valid C++ code with -std=c++14 (in assemble_integer, at varasm.c:2733)

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79781

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

--- Comment #6 from Marek Polacek  ---
This is what ICEd:

void c() {
  static __int128_t d = (long)& - (long)&
a:
b:;
}

I'll add it.

[Bug c++/68265] Arbitrary syntactic nonsense silently accepted after 'int (*){}' until the next close brace

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68265

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Marek Polacek  ---
Fixed.

[Bug c++/68265] Arbitrary syntactic nonsense silently accepted after 'int (*){}' until the next close brace

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68265

--- Comment #5 from Marek Polacek  ---
Author: mpolacek
Date: Thu Jun 20 22:06:36 2019
New Revision: 272525

URL: https://gcc.gnu.org/viewcvs?rev=272525=gcc=rev
Log:
PR c++/68265
* g++.dg/parse/error62.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/parse/error62.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/68265] Arbitrary syntactic nonsense silently accepted after 'int (*){}' until the next close brace

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68265

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

--- Comment #4 from Marek Polacek  ---
Fixed by r258549.

[Bug c++/87512] Error: the type ‘const auto’ of ‘constexpr’ variable is not literal

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87512

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Marek Polacek  ---
Fixed.

[Bug c++/87512] Error: the type ‘const auto’ of ‘constexpr’ variable is not literal

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87512

--- Comment #2 from Marek Polacek  ---
Author: mpolacek
Date: Thu Jun 20 15:37:35 2019
New Revision: 272512

URL: https://gcc.gnu.org/viewcvs?rev=272512=gcc=rev
Log:
PR c++/87512
* g++.dg/cpp1z/inline-var7.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp1z/inline-var7.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/87512] Error: the type ‘const auto’ of ‘constexpr’ variable is not literal

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87512

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-06-20
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Fixed by r266055; adding the test.

[Bug c++/90490] [9/10 Regression] ICE on noexcept with decltype expression

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90490

Marek Polacek  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #5 from Marek Polacek  ---
https://gcc.gnu.org/ml/gcc-patches/2019-06/msg01241.html

[Bug c++/83413] that's a compiler bug, not something we can address. MAME is known to be buildable for other ARM targets (e.g. Raspberry Pi) right now so it appears to be an issue with whatever you're

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83413

Marek Polacek  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 CC||mpolacek at gcc dot gnu.org
 Resolution|--- |INVALID

--- Comment #4 from Marek Polacek  ---
Looks invalid, closing.

[Bug c++/90490] [9/10 Regression] ICE on noexcept with decltype expression

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90490

--- Comment #4 from Marek Polacek  ---
I have a patch now.

[Bug c++/89873] internal compiler error: unexpected expression of kind implicit_conv_expr

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89873

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marek Polacek  ---
Fixed.

[Bug c++/89873] internal compiler error: unexpected expression of kind implicit_conv_expr

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89873

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Thu Jun 20 12:22:25 2019
New Revision: 272507

URL: https://gcc.gnu.org/viewcvs?rev=272507=gcc=rev
Log:
PR c++/89873
* g++.dg/cpp1y/noexcept1.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/noexcept1.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/89873] internal compiler error: unexpected expression of kind implicit_conv_expr

2019-06-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89873

--- Comment #2 from Marek Polacek  ---
And fixed by r270319.

[Bug c++/57868] misleading location for invalid variadic template

2019-06-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57868

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Assignee|mpolacek at gcc dot gnu.org|unassigned at gcc dot 
gnu.org

[Bug c++/64235] Internal compiler error (Segmentation fault)

2019-06-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64235

Marek Polacek  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #3 from Marek Polacek  ---
https://gcc.gnu.org/ml/gcc-patches/2019-06/msg01185.html

[Bug c++/64235] Internal compiler error (Segmentation fault)

2019-06-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64235

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

[Bug c++/60364] [[noreturn]] specified for second declaration but not first doesn't result in a diagnostic

2019-06-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60364

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Marek Polacek  ---
Fixed.

[Bug c++/60364] [[noreturn]] specified for second declaration but not first doesn't result in a diagnostic

2019-06-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60364

--- Comment #6 from Marek Polacek  ---
Author: mpolacek
Date: Wed Jun 19 21:27:45 2019
New Revision: 272486

URL: https://gcc.gnu.org/viewcvs?rev=272486=gcc=rev
Log:
PR c++/60364 - noreturn after first decl not diagnosed.
* attribs.c (get_attribute_namespace): No longer static.
(decl_attributes): Avoid shadowing.  Preserve the C++11 form for C++11
attributes.
(attr_noreturn_exclusions): Make it extern.
* attribs.h (get_attribute_namespace): Declare.
* tree-inline.c (function_attribute_inlinable_p): Use
get_attribute_name.

* c-attribs.c (handle_noreturn_attribute): No longer static.
* c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
Declare.
* c-format.c (check_function_format): Use get_attribute_name.

* decl.c (duplicate_decls): Give an error when a function is
declared [[noreturn]] after its first declaration.
* parser.c (cp_parser_std_attribute): Don't treat C++11 noreturn
attribute as equivalent to GNU's.
* tree.c (std_attribute_table): Add noreturn.

* g++.dg/warn/noreturn-8.C: New test.
* g++.dg/warn/noreturn-9.C: New test.
* g++.dg/warn/noreturn-10.C: New test.
* g++.dg/warn/noreturn-11.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/warn/noreturn-10.C
trunk/gcc/testsuite/g++.dg/warn/noreturn-11.C
trunk/gcc/testsuite/g++.dg/warn/noreturn-8.C
trunk/gcc/testsuite/g++.dg/warn/noreturn-9.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/attribs.c
trunk/gcc/attribs.h
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-attribs.c
trunk/gcc/c-family/c-common.h
trunk/gcc/c-family/c-format.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/parser.c
trunk/gcc/cp/tree.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-inline.c

[Bug c++/90940] [9/10 Regression] Miscompilation of ternary operator with throw expression in return statement

2019-06-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90940

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #4 from Marek Polacek  ---
I think it's a dup of 90393.

[Bug c++/90936] [9 Regression] Ambiguous call with ref-qualified conversion operators

2019-06-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90936

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
I think the error is expected.  Changed in r269602.

[Bug c++/84698] ICE when using noexcept(noexcept()) declaration on global friend function of template class

2019-06-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84698

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marek Polacek  ---
Fixed.

[Bug c++/84698] ICE when using noexcept(noexcept()) declaration on global friend function of template class

2019-06-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84698

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Tue Jun 18 21:50:51 2019
New Revision: 272443

URL: https://gcc.gnu.org/viewcvs?rev=272443=gcc=rev
Log:
PR c++/84698
* g++.dg/cpp0x/noexcept42.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept42.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/84698] ICE when using noexcept(noexcept()) declaration on global friend function of template class

2019-06-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84698

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

--- Comment #2 from Marek Polacek  ---
Fixed by r270005.  I think I'll add the testcase.

[Bug c++/83689] Internal compiler error using is_trivially_default_constructible on array of nontrivially-destructible types

2019-06-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83689

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||mpolacek at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #3 from Marek Polacek  ---
Fixed for GCC 8+, I suppose we could close it now.

  1   2   3   4   5   6   7   8   9   10   >