[Bug c++/110242] ICE on valid (decltype with lambda)

2024-02-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110242 --- Comment #3 from Marek Polacek --- We're trying to emit the "no return statement in function returning non-void" warning, which triggers dump_template_bindings: 493 push_deferring_access_checks (dk_no_check); 494 t = tsubst

[Bug target/106355] Linux s390x -O2 argument passing miscompile

2024-02-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug c++/113987] [12/13 Regression] Binding a reference to an uninitialized data member should not cause -Wuninitialized

2024-02-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113987 Marek Polacek changed: What|Removed |Added Summary|[12/13/14 Regression] |[12/13 Regression] Binding

[Bug c++/85973] [[nodiscard]] on class shall emit a warning for unused anonymous variable

2024-02-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85973 Marek Polacek changed: What|Removed |Added CC||tiagomacarios at gmail dot com ---

[Bug c++/98520] nodiscard not diagnosed in comma operator

2024-02-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98520 Marek Polacek changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Bug c++/107457] ICE when template lambda alias used as default template argument

2024-02-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107457 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org ---

[Bug c++/107430] [meta-bug] lambda in decltype

2024-02-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107430 Bug 107430 depends on bug 110107, which changed state. Bug 110107 Summary: ICE on invalid code with lambda https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110107 What|Removed |Added

[Bug c++/110107] ICE on invalid code with lambda

2024-02-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110107 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug c++/110242] ICE on valid (decltype with lambda)

2024-02-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110242 --- Comment #2 from Marek Polacek --- *** Bug 110107 has been marked as a duplicate of this bug. ***

[Bug c++/110242] ICE on valid (decltype with lambda)

2024-02-29 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110242 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/59465] [11/12/13/14 Regression] g++ allows direct-initialization of an array of class type from another array in a mem-initializer

2024-02-22 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59465 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org

[Bug c++/59465] [11/12/13/14 Regression] g++ allows direct-initialization of an array of class type from another array in a mem-initializer

2024-02-22 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59465 --- Comment #6 from Marek Polacek --- Started to be accepted with r0-110915-ga034826198b771: https://gcc.gnu.org/pipermail/gcc-patches/2011-August/320236.html which was supposed to be a cleanup, not a deliberate change to start accepting the

[Bug c++/59465] [11/12/13/14 Regression] g++ allows direct-initialization of an array of class type from another array in a mem-initializer

2024-02-22 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59465 --- Comment #5 from Marek Polacek --- We accept the test because we do else if (type_build_ctor_call (type) || (init && CLASS_TYPE_P (strip_array_types (type { if (TREE_CODE (type) == ARRAY_TYPE) {

[Bug c++/59465] [11/12/13/14 Regression] g++ allows direct-initialization of an array of class type from another array in a mem-initializer

2024-02-22 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59465 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/114031] gcc rejects valid code with pointer to member field cast inside a class not completed

2024-02-21 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114031 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org ---

[Bug c++/113987] [12/13/14 Regression] Binding a reference to an uninitialized data member should not cause -Wuninitialized

2024-02-21 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113987 Marek Polacek changed: What|Removed |Added Keywords||patch --- Comment #6 from Marek

[Bug c++/113987] [12/13/14 Regression] Binding a reference to an uninitialized data member should not cause -Wuninitialized

2024-02-20 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113987 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug c++/113987] [12/13/14 Regression] Binding a reference to an uninitialized data member should not cause -Wuninitialized

2024-02-20 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113987 --- Comment #5 from Marek Polacek --- We already check !INDIRECT_TYPE_P, but here we're invoking a constructor, and we don't check that its parameters are !INDIRECT_TYPE_P.

[Bug c++/113969] ICE: SIGSEGV in finish_enum_value_list (decl.cc:17143) (or build_enumerator (decl.cc:17438) ) on invalid code

2024-02-17 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113969 Marek Polacek changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/113969] ICE: SIGSEGV in finish_enum_value_list (decl.cc:17143) (or build_enumerator (decl.cc:17438) ) on invalid code

2024-02-17 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113969 Marek Polacek changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/96496] Conversion to enum with underlying type bool produces wrong result

2024-02-17 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96496 Marek Polacek changed: What|Removed |Added Last reconfirmed|2020-08-06 00:00:00 |2024-2-17 --- Comment #5 from Marek

[Bug c++/96360] ICE in tree check: expected integer_cst, have truth_orif_expr in get_len, at tree.h:5954

2024-02-17 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96360 Marek Polacek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/113966] [14 Regression] Internal compiler error in `do_auto_deduction`

2024-02-17 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113966 --- Comment #5 from Marek Polacek --- /* Check any placeholder constraints against the deduced type. */ if (processing_template_decl && context == adc_unify) /* Constraints will be checked after deduction. */; else if (tree constr =

[Bug c++/113966] [14 Regression] Internal compiler error in `do_auto_deduction`

2024-02-17 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113966 Marek Polacek changed: What|Removed |Added Ever confirmed|0 |1 Summary|Internal compiler

[Bug c++/113969] ICE: SIGSEGV in finish_enum_value_list (decl.cc:17143) (or build_enumerator (decl.cc:17438) ) on invalid code

2024-02-17 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113969 Marek Polacek changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug c++/113968] ICE: in create_tmp_var, at gimple-expr.cc:488 with -fcontracts and invalid member in contract

2024-02-17 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113968 Marek Polacek changed: What|Removed |Added Last reconfirmed||2024-02-17 CC|

[Bug c++/113158] [11/12/13 Regression] Erroneous "looser exception specification" error for class template and depedent noexcept value

2024-02-17 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113158 Marek Polacek changed: What|Removed |Added Summary|[11/12/13/14 Regression]|[11/12/13 Regression]

[Bug c++/104836] ice in unify, at cp/pt.cc:24055

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104836 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org ---

[Bug c++/57527] [C++11] Nested variadic templates cause internal compiler error

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57527 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/109859] [12/13/14 Regression] ICE on concept mis-typed as template type parameter

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109859 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org ---

[Bug c++/97990] [11/12/13/14 Regression] ICE: ‘verify_type’ failed with vector types and non-PODs since r6-5222-gba6a6a1d44c17f25

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97990 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/111974] internal error: Segmentation fault on Ubuntu 23.10 (x86-64) - compiling RefPerSys

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111974 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org

[Bug c++/89336] internal compiler error when compiling a constexpr function

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89336 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/55004] [meta-bug] constexpr issues

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 Bug 55004 depends on bug 89336, which changed state. Bug 89336 Summary: internal compiler error when compiling a constexpr function https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89336 What|Removed |Added

[Bug c++/67491] [meta-bug] concepts issues

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 Bug 67491 depends on bug 87536, which changed state. Bug 87536 Summary: Illegal recursive concept leads to compiler ICE https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87536 What|Removed |Added

[Bug c++/87536] Illegal recursive concept leads to compiler ICE

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87536 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org

[Bug c++/87331] if delete "node->operator_type = kADD; " will report "internal compiler error: Segmentation fault"

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87331 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org

[Bug c++/85908] Internal error with concepts and polymorphic lambdas

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85908 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

[Bug c++/29040] missing access control checks in subclasses for nested types

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29040 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|NEW CC|

[Bug c++/26278] ambiguous overload candidates list contains duplicates

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26278 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/19073] cp_binding_level::names not returning all decls

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19073 Marek Polacek changed: What|Removed |Added Resolution|--- |WORKSFORME CC|

[Bug c++/17000] parse error calling member template function of non-lvalue from within template class member

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17000 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug c++/113545] ICE in label_matches with constexpr function with switch-statement and converted (nonconstant, cast address) input

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113545 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/113158] [11/12/13/14 Regression] Erroneous "looser exception specification" error for class template and depedent noexcept value

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113158 Marek Polacek changed: What|Removed |Added Keywords||patch --- Comment #3 from Marek

[Bug c++/113789] [13 Regression] ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Summary|[13/14

[Bug c++/98388] Throwing move-only parameter results in hard error in SFINAE context

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98388 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/113853] implicit move in throw in trailing return type

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113853 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/98752] wrong "error: ‘this’ is not a constant expression" with consteval constructor

2024-02-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98752 --- Comment #7 from Marek Polacek --- Comment 5 test was fixed by r14-5979-g99d114c15523e0 commit 99d114c15523e0bfe7a89ef1947f82eb5ff0260b Author: Marek Polacek Date: Fri Nov 17 14:48:44 2023 -0500 c++: P2280R4, Using unknown refs in

[Bug c++/113791] Incorrect handling of lvalue to rvalue conversion in ternary operator

2024-02-15 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113791 --- Comment #6 from Marek Polacek --- Stage 1 work. Putting this aside for GCC 15.

[Bug c++/113791] Incorrect handling of lvalue to rvalue conversion in ternary operator

2024-02-15 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113791 --- Comment #5 from Marek Polacek --- Looking. It's https://cplusplus.github.io/CWG/issues/1895.html which we don't implement yet.

[Bug c++/113924] [11/12/13/14 Regression] worse diagnostic for invalid decltype since r10-5347

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113924 Marek Polacek changed: What|Removed |Added Summary|worse diagnostic for|[11/12/13/14 Regression]

[Bug c++/113924] New: worse diagnostic for invalid decltype since r10-5347

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113924 Bug ID: 113924 Summary: worse diagnostic for invalid decltype since r10-5347 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/113920] Make -std=gnu++20 default for GCC 15

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113920 Marek Polacek changed: What|Removed |Added Ever confirmed|0 |1 Assignee|unassigned at gcc

[Bug c++/113920] New: Make -std=gnu++20 default for GCC 15

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113920 Bug ID: 113920 Summary: Make -std=gnu++20 default for GCC 15 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/72751] anonymous union within an anonymous union accepted without diagnostic (i.e. add -Wnested-anon-types)

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72751 --- Comment #5 from Marek Polacek --- We should also make sure that __extension__ suppresses the -Wnested-anon-types diagnostic.

[Bug c++/72751] anonymous union within an anonymous union accepted without diagnostic (i.e. add -Wnested-anon-types)

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72751 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/113919] Nested anonymous unions should be prohibited in ISO C++

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113919 Marek Polacek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/72751] anonymous union within an anonymous union accepted without diagnostic (i.e. add -Wnested-anon-types)

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72751 Marek Polacek changed: What|Removed |Added CC||tsqurt at outlook dot com --- Comment

[Bug c++/113919] Nested anonymous unions should be prohibited in ISO C++

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113919 --- Comment #3 from Marek Polacek --- clang++ has -Wnested-anon-types so I think we need that too.

[Bug c++/113919] Nested anonymous unions should be prohibited in ISO C++

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113919 --- Comment #2 from Marek Polacek --- I suppose this should fix it but there are testsuite FAILs. --- a/gcc/cp/decl.cc +++ b/gcc/cp/decl.cc @@ -5522,6 +5522,12 @@ fixup_anonymous_aggr (tree t) } } } + /*

[Bug c++/113919] Nested anonymous unions should be prohibited in ISO C++

2024-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113919 Marek Polacek changed: What|Removed |Added Last reconfirmed||2024-02-14

[Bug c++/113760] [DR1693] gcc rejects valid empty-declaration in pedantic mode

2024-02-13 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760 --- Comment #17 from Marek Polacek --- Partially fixed for GCC 14. Leaving this open for more changes in GCC 15.

[Bug c++/113760] [DR1693] gcc rejects valid empty-declaration in pedantic mode

2024-02-13 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760 Marek Polacek changed: What|Removed |Added Keywords||patch --- Comment #15 from Marek

[Bug c++/112436] SFINAE-unfriendly error on throwing pointer to incomplete type

2024-02-13 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112436 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/113760] [DR1693] gcc rejects valid empty-declaration in pedantic mode

2024-02-12 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760 --- Comment #14 from Marek Polacek --- My current patch appears to handle that correctly: $ ./cc1plus -quiet q.C -pedantic-errors -std=c++98 -Wno-error=extra-semi q.C:3:3: warning: extra ‘;’ outside of a function only allowed in C++11

[Bug c++/113760] [DR1693] gcc rejects valid empty-declaration in pedantic mode

2024-02-12 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760 --- Comment #12 from Marek Polacek --- Thank for your comment. In the end I went with -std=c++03 -pedantic-errors -Wextra-semi -> warnings -std=c++03 -pedantic -Wextra-semi -> warnings (not pedwarn) based on the principle that a more

[Bug c++/113760] [DR1693] gcc rejects valid empty-declaration in pedantic mode

2024-02-12 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760 --- Comment #10 from Marek Polacek --- And we should also warn in C++98 with -Wc++11-extensions for an extra ';' outside of a function I suppose...

[Bug c++/113545] ICE in label_matches with constexpr function with switch-statement and converted (nonconstant, cast address) input

2024-02-12 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113545 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org

[Bug c++/113760] [DR1693] gcc rejects valid empty-declaration in pedantic mode

2024-02-12 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org

[Bug c++/113760] [DR1693] gcc rejects valid empty-declaration in pedantic mode

2024-02-12 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760 --- Comment #9 from Marek Polacek --- And: -pedantic-errors -> errors only in C++03

[Bug c++/113760] [DR1693] gcc rejects valid empty-declaration in pedantic mode

2024-02-12 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760 --- Comment #8 from Marek Polacek --- (In reply to Jakub Jelinek from comment #7) > g++ emits 4 errors on > struct S > { > void foo () {} > void bar () {}; > void baz () = delete; > void qux () = delete; > ; > void corge () =

[Bug c++/111918] #pragma GCC diagnostic pop does not restore error status of -Wnarrowing

2024-02-12 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111918 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org

[Bug c++/112436] SFINAE-unfriendly error on throwing pointer to incomplete type

2024-02-10 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112436 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Bug c++/113789] [13/14 Regression] ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter

2024-02-10 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789 --- Comment #7 from Marek Polacek --- The ICE was fixed by r14-8903-g3a3e0f1b46a3ad. But I'm not done here yet.

[Bug c++/107126] -Wc++20-compat should complain about template-id in out of class definition for destructor

2024-02-10 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107126 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/97202] GCC reports an error: expected unqualified-id before ‘short’

2024-02-10 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97202 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/98388] Throwing move-only parameter results in hard error in SFINAE context

2024-02-09 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98388 Marek Polacek changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/113834] [14 Regression] internal compiler error: in tree_to_shwi, at tree.cc:6461

2024-02-09 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113834 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/113853] implicit move in throw in trailing return type

2024-02-09 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113853 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org

[Bug c++/113853] New: implicit move in throw in trailing return type

2024-02-09 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113853 Bug ID: 113853 Summary: implicit move in throw in trailing return type Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug c++/113834] [14 Regression] internal compiler error: in tree_to_shwi, at tree.cc:6461

2024-02-09 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113834 --- Comment #7 from Marek Polacek --- (In reply to Jakub Jelinek from comment #6) > (In reply to Marek Polacek from comment #5) > > To fix the ICE we could do: > > > > --- a/gcc/cp/semantics.cc > > +++ b/gcc/cp/semantics.cc > > @@ -4644,7

[Bug c++/113834] [14 Regression] internal compiler error: in tree_to_shwi, at tree.cc:6461

2024-02-09 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113834 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org

[Bug c++/113834] [14 Regression] internal compiler error: in tree_to_shwi, at tree.cc:6461

2024-02-09 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113834 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org ---

[Bug c++/113839] misleading syntax error message

2024-02-08 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113839 Marek Polacek changed: What|Removed |Added Last reconfirmed||2024-02-08 CC|

[Bug c++/113830] GCC accepts invalid code when instantiating the local class inside a function

2024-02-08 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113830 --- Comment #6 from Marek Polacek --- (In reply to Bo Wang from comment #4) > (In reply to Marek Polacek from comment #2) > > Bug 66900 is somewhat related in that we also allow int::j. > > I believe these two bugs have different root causes.

[Bug c++/113830] GCC accepts invalid code when instantiating the local class inside a function

2024-02-08 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113830 Marek Polacek changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/113814] [modules] canonical types ICE with imported partial specialization matching existing template-id

2024-02-07 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113814 Marek Polacek changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug c++/29834] g++ thinks it is a declaration when it cannot be

2024-02-07 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29834 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/98388] Throwing move-only parameter results in hard error in SFINAE context

2024-02-07 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98388 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org

[Bug c++/113798] [C++26] P2662R3 - Pack indexing

2024-02-07 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113798 Marek Polacek changed: What|Removed |Added Last reconfirmed||2024-02-07

[Bug c++/113800] [C++26] P2308R1 - Template parameter initialization

2024-02-07 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113800 Marek Polacek changed: What|Removed |Added Last reconfirmed||2024-02-07 Ever confirmed|0

[Bug c++/113789] [13/14 Regression] ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter

2024-02-06 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789 --- Comment #5 from Marek Polacek --- IOW, this should be accepted in C++23 but isn't (clang++ accepts in C++23): struct AutoPtr { AutoPtr() = default; AutoPtr(AutoPtr&) {} }; template auto f(T p, int) -> decltype(throw p, 1) =

[Bug c++/113789] [13/14 Regression] ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter

2024-02-06 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789 --- Comment #4 from Marek Polacek --- Um, that's not it. Since struct AutoPtr { AutoPtr() = default; AutoPtr(AutoPtr&) {} }; template int f (T p) { throw p; } void g () { f (AutoPtr ()); } is rejected in C++23, we probably

[Bug c++/113791] Incorrect handling of lvalue to rvalue conversion in ternary operator

2024-02-06 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113791 Marek Polacek changed: What|Removed |Added Keywords|needs-reduction |rejects-valid --- Comment #2 from

[Bug c++/113791] Incorrect handling of lvalue to rvalue conversion in ternary operator

2024-02-06 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113791 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Ever

[Bug c++/113789] [13/14 Regression] ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter

2024-02-06 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789 --- Comment #3 from Marek Polacek --- I have a patch for the ICE (build_throw doesn't have a complain param so we wind up with "error reporting routines re-entered").

[Bug c++/113789] [13/14 Regression] ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter

2024-02-06 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789 Marek Polacek changed: What|Removed |Added Summary|ICE on P2266/C++23 |[13/14 Regression] ICE on

[Bug c++/113789] ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter

2024-02-06 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789 Marek Polacek changed: What|Removed |Added Last reconfirmed||2024-02-06

[Bug c++/113788] Deducing this is broken with structured binding

2024-02-06 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113788 --- Comment #2 from Marek Polacek --- Yes, seems that currently we only check that it's the first specifier: /* Special case for "this" specifier, indicating a parm is an xobj parm. The "this" specifier must be the first

[Bug c++/113788] Deducing this is broken with structured binding

2024-02-06 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113788 Marek Polacek changed: What|Removed |Added Last reconfirmed||2024-02-06

<    1   2   3   4   5   6   7   8   9   10   >