[Bug c++/66901] Segmentation fault in compiler instead of error message for ill-formed program with namespace alias and qualified definition

2015-07-26 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66901 Anders Granlund changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/66879] Error message when defining a member function inside a class definition

2015-07-26 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66879 --- Comment #8 from Anders Granlund --- *** Bug 66901 has been marked as a duplicate of this bug. ***

[Bug c++/66879] Error message when defining a member function inside a class definition

2015-07-26 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66879 --- Comment #9 from Anders Granlund --- *** Bug 66878 has been marked as a duplicate of this bug. ***

[Bug c++/66878] Segmentation fault when compiling

2015-07-26 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66878 Anders Granlund changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/66879] Error message when defining a member function inside a class definition

2015-07-26 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66879 --- Comment #10 from Anders Granlund --- Here comes two more test cases moved in from my related ICE on compile bug reports: namespace X { struct S; namespace Y { namespace Z = X; struct Z::S {}; } } int main() {} st

[Bug c++/66934] Compiler accepting ill-formed program with extern variable declarations and using-declaration

2015-07-26 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66934 --- Comment #4 from Anders Granlund --- I'm pulling in this test case from my related bug report. int x = 1; int main() { extern int x; using ::x; } I this case the program is well-formed (the two declarations in main are not

[Bug c++/66935] Compiler rejects well-formed program with local extern variable declaration and using-declaration

2015-07-26 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66935 Anders Granlund changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/66934] Compiler accepting ill-formed program with extern variable declarations and using-declaration

2015-07-26 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66934 --- Comment #5 from Anders Granlund --- *** Bug 66935 has been marked as a duplicate of this bug. ***

[Bug c++/66934] Compiler accepting ill-formed program with extern variable declarations and using-declaration

2015-07-26 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66934 --- Comment #6 from Anders Granlund --- (In reply to Jonathan Wakely from comment #3) > Problem report i.e. bugzilla bug. Ok. Done.

[Bug c++/66934] Compiler accepting ill-formed program with extern variable declarations and using-declaration

2015-07-26 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66934 --- Comment #7 from Anders Granlund --- (In reply to Anders Granlund from comment #2) > (In reply to Jonathan Wakely from comment #1) > > I think we could combine most of your reports into one or two PRs since > > they're all related and fixing t

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

2015-07-27 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67017 --- Comment #6 from Anders Granlund --- Now I got the reply. It seems like the wording of the standard changed with the resolution of this c++ standard core defect: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1265 So the proble

[Bug c++/67026] New: GCC incorrectly rejects well-formed constexpr function definition

2015-07-27 Thread anders.granlund.0 at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following program (proc.cc): void g() {} constexpr void f() { return; g(); } int main() {} Compile it with the

[Bug c++/67026] GCC incorrectly rejects well-formed constexpr function definition

2015-07-28 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67026 --- Comment #3 from Anders Granlund --- (In reply to Andrew Pinski from comment #2) > Actually wait. I think this is invalid and clang is incorrect in not > rejecting it. Because you have a call to a non constexpr in a constexpr > function; doe

[Bug c++/67047] New: GCC accepts ill-formed program with enumerator not representable in uintmax_t

2015-07-28 Thread anders.granlund.0 at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following program (prog.cc): #include #include enum { x = std::numeric_limits::max(), y }; int

[Bug c++/67047] GCC accepts ill-formed program with enumerator not representable in uintmax_t

2015-07-28 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67047 --- Comment #2 from Anders Granlund --- (In reply to Andrew Pinski from comment #1) > So the enum is an unsigned type so UINTMAX_MAX +1 is 0 as it is always > representable due to the rules of unsigned types and wrapping. Unless I > miss-underst

[Bug c++/67047] GCC accepts ill-formed program with enumerator not representable in uintmax_t

2015-07-28 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67047 --- Comment #3 from Anders Granlund --- It seems like the increment of the enumerator x triggered the use of the following compiler extension: https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html This without any error messages. That is not

[Bug c++/67048] New: GCC rejects well-formed program using empty anonymous enum specifier in a variable declaration

2015-07-28 Thread anders.granlund.0 at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following well-formed program (prog.cc): enum {} x; int main() {} Compile it with

[Bug c++/67047] GCC accepts ill-formed program with enumerator not representable in uintmax_t

2015-07-29 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67047 --- Comment #5 from Anders Granlund --- (In reply to Jonathan Wakely from comment #4) > Yes you can verify that with > > static_assert( std::is_same::type, > unsigned __int128>::value, ""); > > I suppose there should be a diagnostic with -Wpeda

[Bug c++/67010] Name hiding in the same declarative region fails when done via using-directive

2015-07-29 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67010 Anders Granlund changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/67065] New: Missing diagnostics for ill-formed program with main variable instead of function

2015-07-30 Thread anders.granlund.0 at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- The following program is ill-formed (proc.cc): int main; Compile it with the following command line

[Bug c++/67074] New: Name lookup ambiguity between namespace and its alias

2015-07-30 Thread anders.granlund.0 at gmail dot com
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Test case: namespace P{ namespace X { static int i = 1; } } namespace Q { namespace X = P::X; } using namespace P; using namespace Q; int main

[Bug c++/67074] Name lookup ambiguity between namespace and its alias

2015-07-30 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67074 --- Comment #1 from Anders Granlund --- I have reported the same bug in clang also: https://llvm.org/bugs/show_bug.cgi?id=24324 Richard Smith confirmed it and added this additional test case: And likewise: namespace N {} namespace N = N;

[Bug c++/67065] Missing diagnostics for ill-formed program with main variable instead of function

2015-07-30 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67065 --- Comment #2 from Anders Granlund --- (In reply to Jonathan Wakely from comment #1) > (In reply to Anders Granlund from comment #0) > > The following program is ill-formed (proc.cc): > > > > int main; > > > > Compile it with the following c

[Bug c++/67065] Missing diagnostics for ill-formed program with main variable instead of function

2015-07-30 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67065 --- Comment #3 from Anders Granlund --- (In reply to Jonathan Wakely from comment #1) > (In reply to Anders Granlund from comment #0) > > The following program is ill-formed (proc.cc): > > > > int main; > > > > Compile it with the following c

[Bug c++/67166] New: Inconsistency between static data members and static functions when using multiple inheritance

2015-08-09 Thread anders.granlund.0 at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following two programs: struct A { static const int x = 0; }; struct B : A

[Bug c++/97363] New: Missing diagnostics when trying to initialize rvalue reference variable with lvalue expression when using decltype(auto) type deduction.

2020-10-10 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following program

[Bug c++/97375] New: Unexpected top-level const retainment when declaring non-type template paramter with decltype(auto)

2020-10-11 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following program: #include #include template void f1() { std

[Bug c++/97376] New: Function type to function pointer type adjustment for non-type template paramter does not work when using decltype(auto)

2020-10-11 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following program: #include

[Bug c++/97375] Unexpected top-level const retainment when declaring non-type template paramter with decltype(auto)

2020-10-14 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97375 --- Comment #1 from Anders Granlund --- Here is another example of the same problem without using decltype(auto), so the problem seems to be more general: #include #include template void f1() { std::cout << std::is_const_v << st

[Bug c++/97475] New: An unnamed class with a typedef name for linkage purposes having a method.

2020-10-17 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following c++ program: typedef struct { void f(); } X; int main() { } It is not

[Bug c++/97479] New: Auto as template argument

2020-10-18 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following program: template class A { }; int main() { A a = A(); } It is accepted when compiling it with "-std=c++20 -pedantic-errors". Th

[Bug c++/97569] New: Declaring a struct in a field declaration of another struct.

2020-10-25 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following c++ program: int main() { struct A { struct B *b; }; using U = B

[Bug c++/97569] Declaring a struct in a field declaration of another struct. gcc and clang difference.

2020-10-25 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97569 --- Comment #2 from Anders Granlund --- (In reply to Jonathan Wakely from comment #1) > (In reply to Anders Granlund from comment #0) > > The interesting thing is that if we replace struct S with struct S {} > > both compilers agree on reject

[Bug c++/97569] Declaring a struct in a field declaration of another struct. gcc and clang difference.

2020-10-28 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97569 Anders Granlund changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug c++/97475] An unnamed class with a typedef name for linkage purposes having a method.

2021-08-05 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97475 --- Comment #4 from Anders Granlund --- Sounds good to me! On Thu, 5 Aug 2021, 13:35 redi at gcc dot gnu.org, wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97475 > > --- Comment #3 from Jonathan Wakely --- > Maybe we should make this

<    1   2