[Bug c++/96871] New: Fails to parse templated constructor in template class

2020-08-31 Thread tiagomacarios at gmail dot com
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- Both clang and MSVC compile the below fine - gcc fails. https://godbolt.org/z/hfPdKT #include template struct S { template S(Arg&&... arg); }

[Bug c++/89880] New: compiles code that should not be compiled

2019-03-28 Thread tiagomacarios at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- https://godbolt.org/z/4cbr24 void f() { int a; int b; bool c; if ((!((int(bool(a))) ^ (int(bool(b && !(c))) {} }

[Bug c++/90473] New: gcc does not call function in comma operator

2019-05-14 Thread tiagomacarios at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- In the code below gcc should call f() prios to calling b(), but that does not happen. https://godbolt.org/z/e245vi void f(); void b(void* p = (f(), nullptr)); void z

[Bug libstdc++/86433] New: Shouldn't non const hashers also be allowed?

2018-07-07 Thread tiagomacarios at gmail dot com
onent: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- https://godbolt.org/g/Z1cqm9 #include struct my_hash { std::size_t operator() (int const&) /*const*/ {

[Bug c++/87152] New: internal compiler error: in tsubst_copy, at cp/pt.c:15484

2018-08-30 Thread tiagomacarios at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- https://godbolt.org/z/RnO6a- #include #include #include template constexpr int int_from_bits() { constexpr auto a = std::array{bits

[Bug c++/87179] New: duplicate extern "C" functions in different namespaces not flagged as an error

2018-08-31 Thread tiagomacarios at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- Code below compiles in GCC, but is discarded by clang. namespace A { extern "C" int g() { return

[Bug c++/87660] New: Fail to compile unique_ptr of incomplete tyoe

2018-10-19 Thread tiagomacarios at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- https://godbolt.org/z/zvJQ4F For the following code GCC will fail to compile the {} and the nullptr initializes. #include struct foo; struct bar { #if defined

[Bug c++/85552] Adding curly braces to the declaration of a std::unique_ptr to a forward declared class breaks compilation

2018-10-22 Thread tiagomacarios at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85552 --- Comment #4 from Tiago Macarios --- Related clang bug: https://bugs.llvm.org/show_bug.cgi?id=39363

[Bug c++/87699] New: Implement CWG 1512

2018-10-22 Thread tiagomacarios at gmail dot com
: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- As per http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3478.html the below should not compile. https://godbolt.org/z/mOpxau bool foo(int* bar) { return bar > 0; }

[Bug c++/88118] New: GCC keeps unnecessary calls to new

2018-11-20 Thread tiagomacarios at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- With the code below clang generates: main: # @main mov eax, 2 ret GCC will get to the correct result, but will keep the new calls: main: sub rsp, 8 mov

[Bug c++/88118] GCC keeps unnecessary calls to new

2018-11-21 Thread tiagomacarios at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88118 --- Comment #6 from Tiago Macarios --- Related clang bug: https://bugs.llvm.org/show_bug.cgi?id=39731

[Bug c++/88162] New: GCC does not accept non-type template parameters of class type

2018-11-22 Thread tiagomacarios at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- Looking at http://eel.is/c++draft/temp.arg.nontype I would think that the code below is C++17 complaint. GCC thinks this is only

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

2021-01-04 Thread tiagomacarios at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- https://godbolt.org/z/13j51h struct [[nodiscard]] S{}; void f(); void _() { f(), S{}; }

[Bug c++/98543] New: fails to diagnose unnecessary functions

2021-01-05 Thread tiagomacarios at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- clang diagnoses unnecessary functions, gcc fails to: https://godbolt.org/z/vvErGh static void f() { [[maybe_unused]] auto var = &f; }

[Bug c++/98750] New: does not detect dead code

2021-01-19 Thread tiagomacarios at gmail dot com via Gcc-bugs
: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- for the following code gcc will not detect that f() is never called. msvc detects this correctly. https://godbolt.org/z/Y5n78v ``` void f(); void _(int num) { switch (num

[Bug c++/98750] does not detect dead code

2021-01-20 Thread tiagomacarios at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98750 --- Comment #2 from Tiago Macarios --- Correct. I was expecting a warning there.

[Bug c++/107652] New: c++20 gccchoses incorrect operator== overload

2022-11-11 Thread tiagomacarios at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- In C++20 gcc will chose the incorrect overload for this code. The overload should be ambiguous (see msvc). https://godbolt.org/z/rox1z1Txa ``` namespace N { struct C

[Bug c++/85282] CWG 727 (full specialization in non-namespace scope)

2024-09-06 Thread tiagomacarios at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282 Tiago Macarios changed: What|Removed |Added CC||tiagomacarios at gmail dot com

[Bug c++/115296] New: CTAD fails

2024-05-30 Thread tiagomacarios at gmail dot com via Gcc-bugs
at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- The following code compiles fine with clang and msvc, but fails with gcc. https://godbolt.org/z/e4dP7rzar ``` #include template using array_view = std::span; void fun(std::span s) { [[maybe_unused

[Bug c++/119017] New: error on valid user defined literal

2025-02-25 Thread tiagomacarios at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- The following code compiles fine with clang and MSVC. gcc errors https://godbolt.org/z/1MPvrjfaK ``` #include template struct S { friend consteval S operator""_S(