[Bug c++/86049] New: Array bindings are not const when initializer is

2018-06-04 Thread blitzrakete at gmail dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- Compiles with clang, doesn't under gcc 8.1.0: template struct is_same { static constexpr bool value = false; }; template struct is_same { static constexpr bool

[Bug c++/86369] constexpr const char* comparison fails

2018-07-02 Thread blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86369 Nicolas Lesser changed: What|Removed |Added CC||blitzrakete at gmail dot com

[Bug c++/86703] template auto fails deduction, where template int succeeds

2018-07-27 Thread blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86703 Nicolas Lesser changed: What|Removed |Added CC||blitzrakete at gmail dot com

[Bug c++/86942] New: A trailing-return-type is allowed when the return type is not 'auto' for using declarations

2018-08-13 Thread blitzrakete at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- void test() -> void; // fail => ok using function = void() -> int; // allowed?!? int f();

[Bug c++/86870] New: Declaration disambiguation is too greedy

2018-08-06 Thread blitzrakete at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- struct X { void operator=(int); } x; int main() { 1 + 1, X(x) = 4; // ok X(x) = 4, 1 + 1; // gcc fails } gcc cannot compile the second statement, because it thinks

[Bug c++/86870] Declaration disambiguation is too greedy

2018-08-13 Thread blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86870 --- Comment #1 from Nicolas Lesser --- Oops, I missed to define a default constructor for `X`. This however, does not change the bug report and gcc still incorrectly parses the second statement as a declaration.

[Bug c++/87035] Can't shadow global const int with unnamed enum in class

2018-08-21 Thread blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87035 --- Comment #4 from Nicolas Lesser --- Nice, thank you!

[Bug c++/87035] Can't shadow global const int with unnamed enum in class

2018-08-21 Thread blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87035 --- Comment #2 from Nicolas Lesser --- Huh, interesting. TIL. Where's that rule in the standard? Because I can't find it in [class.mem]. Is it somewhere else or did I just overlook it?

[Bug c++/87035] New: Can't shadow global const int with unnamed enum in class

2018-08-21 Thread blitzrakete at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- const int N = 5; struct X { int Array[N]; // int[5] enum { N }; // fails, redeclaration }; This is well-formed, as the enum value N

[Bug c++/87724] New: gcc allows narrowing conversions in converted constant expressions

2018-10-24 Thread blitzrakete at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- Compiled with -std=c++17 (https://godbolt.org/z/fO32Pd) int main() { static_assert(2); // ill-formed, gcc accepts if constexpr (2

[Bug c++/87971] New: gcc allows nested namespace definition of inline namespaces

2018-11-10 Thread blitzrakete at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- gcc allows the following code with -std=c++17 without any warnings or errors even with -Wall -Wextra -pedantic -pedantic-errors. namespace

[Bug c++/87971] gcc allows nested namespace definition of inline namespaces

2018-11-10 Thread blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87971 Nicolas Lesser changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/87174] New: virt-specifier not recognized on function declared like a variable

2018-08-31 Thread blitzrakete at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- Gcc (no flags) doesn't compile the following code: using F = void(); struct X { virtual F f; }; struct Y : X { F f override

[Bug c++/88358] New: variable template definition taken as function template declaration with implicit typename

2018-12-04 Thread blitzrakete at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- Consider the following (compiled with `-std=c++2a`): template void f(T::type); // ill-formed, gcc accepts

[Bug c++/88313] New: generic lambda in default template argument

2018-12-03 Thread blitzrakete at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- gcc (with no flags) rejects the following code: // 'auto' parameter not permitted in this context template void f(); This is bogus because anywhere where a non-generic lambda

[Bug c++/88358] variable template definition taken as function template declaration with implicit typename

2019-01-26 Thread blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88358 --- Comment #4 from Nicolas Lesser --- Almost the same fix has to apply when the declarator is unqualified: Always treat T::something as a value, never as a type. This is not part of the allowed contexts in P0634. I don't know which core

[Bug c++/89636] New: Duplicate diagnostic when resolving ambiguity between variable and function template using implicit typename

2019-03-08 Thread blitzrakete at gmail dot com
: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- namespace N { inline namespace A { template int f(typename T::type); } inline namespace

[Bug c++/89642] New: gcc rejects valid implicit typename context in cast

2019-03-09 Thread blitzrakete at gmail dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- template void f(T t) { static_cast(t); // gcc rejects, but this is well-formed } gcc rejects the above with: : In function 'void f(T)': :3:18: error: expected

[Bug c++/89642] gcc rejects valid implicit typename context in cast

2019-03-11 Thread blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89642 --- Comment #2 from Nicolas Lesser --- Sorry, I forgot the most important part of the bug report: This is C++20. clang doesn't implement this feature (yet), so it would naturally reject it as is valid in pre C++20. icc has a bug since it accepts

[Bug c/90680] New: Misleading fixit warning with pointers to pointers

2019-05-30 Thread blitzrakete at gmail dot com
: c Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- Consider: int main(void) { struct { int a; } **p; p->a; // error } gcc gives me: : In function 'main': :3:6: error: '*p' is a pointer; did you mean to

[Bug c++/90572] New: Wrong disambiguation in friend declaration as implicit typename context

2019-05-22 Thread blitzrakete at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- template struct C { friend C(T::fn)(); // not implicit typename context, declarator-id of friend

[Bug c++/90342] New: Misleading #include system fixit when using an older C++ version

2019-05-04 Thread blitzrakete at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- #include int main() { std::make_unique(); } If I compile this with -std=c++11, I get: : In function 'int main()': :4:8: error