[Bug libstdc++/93208] duplicated memory_resource, monotomic_buffer_resource vtable, type_info d/t all-inline virtual functions

2020-01-09 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93208 --- Comment #7 from Marc Mutz --- Thanks!

[Bug libstdc++/93208] duplicated memory_resource, monotomic_buffer_resource vtable, type_info d/t all-inline virtual functions

2020-01-09 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93208 Marc Mutz changed: What|Removed |Added Version|10.0|9.1.0 --- Comment #1 from Marc Mutz --- Als

[Bug libstdc++/93208] New: duplicated memory_resource, monotomic_buffer_resource vtable, type_info d/t all-inline virtual functions

2020-01-09 Thread marc at kdab dot com
: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: marc at kdab dot com Target Milestone: --- Both `memory_resource` and `monotonic_buffer_resource` have all virtual methods inline, so their

[Bug c++/92856] incorrectly accepts invalid C++11 braced initialisation of double from long double

2019-12-09 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92856 --- Comment #3 from Marc Mutz --- Indeed, I didn't check that it actually fails in SFINAE. Sorry for that. This works: // https://godbolt.org/z/EfJmS4 #include #include template using nonnarrowing_test = decltype(To{std::declval()

[Bug c++/55783] Warnings instead of compiler errors for narrowing conversions within list-initializations

2019-12-09 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55783 Marc Mutz changed: What|Removed |Added CC||marc at kdab dot com --- Comment #15 from

[Bug c++/92856] incorrectly accepts invalid C++11 braced initialisation of double from long double

2019-12-09 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92856 Marc Mutz changed: What|Removed |Added Resolution|INVALID |DUPLICATE --- Comment #4 from Marc Mutz ---

[Bug c++/92856] New: incorrectly accepts invalid C++11 braced initialisation of double from long double

2019-12-08 Thread marc at kdab dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc at kdab dot com Target Milestone: --- The following code: // https://godbolt.org/z/tWa2dr int main() { extern long double ld; double d{ld

[Bug c++/59423] Misleading warning when 'enum class' base type unresolved: elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword

2019-12-06 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59423 marc at kdab dot com changed: What|Removed |Added CC||marc at kdab dot com --- Comment

[Bug c++/22395] -Weffc++ shouldn't warn about non-virtual dtor of private subclasses

2019-11-22 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22395 --- Comment #8 from marc at kdab dot com --- I don't think Effective C++ is the benchmark any more, so water under bridges that have already burned, but fwiw: contrary to C.127 these days, I learned this rule as "A base class's de

[Bug target/90379] Gcc 9.1 fails "make check" on linux due to missing MacOS-specific header file

2019-05-11 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90379 marc at kdab dot com changed: What|Removed |Added CC||marc at kdab dot com --- Comment

[Bug c++/90372] New: [x64][missed optimization] pushes unused r12 onto stack on unique_ptr use

2019-05-06 Thread marc at kdab dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc at kdab dot com Target Milestone: --- In the following example: https://godbolt.org/z/jHSYue one(), using std::unique_ptr, pushes r12 to the stack just to pop it back at

[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers

2016-10-05 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #10 from marc at kdab dot com --- I cannot confirm that this is fixed in 7.0.0 20161005. This is at commit: PR sanitizer/77823. I still see these errors.

[Bug sanitizer/70342] g++ -fsanitize=undefined never finishes compiling (>24h) in qtxmlpatterns test suite

2016-07-07 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70342 marc at kdab dot com changed: What|Removed |Added Status|RESOLVED|VERIFIED --- Comment #13 from

[Bug libstdc++/60621] std::vector::emplace_back generates massively more code than push_back

2016-07-07 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60621 --- Comment #7 from marc at kdab dot com --- Retesting with GCC 6.1, it looks better now: $ g++ -O2 -o emplace-vs-push_back{.pb,.cpp} $ g++ -O2 -o emplace-vs-push_back{.eb,.cpp} -DEMPLACE_BACK $ strip emplace-vs-push_back.* $ size

[Bug sanitizer/70342] New: g++ -fsanitize=undefined never finishes compiling (>24h) in qtxmlpatterns test suite

2016-03-21 Thread marc at kdab dot com
MED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: marc at kdab dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.

[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers

2016-03-21 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 marc at kdab dot com changed: What|Removed |Added CC||marc at kdab dot com --- Comment

[Bug other/70118] UBSan claims misaligned access in SSE instrinsics

2016-03-07 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70118 marc at kdab dot com changed: What|Removed |Added CC||marc at kdab dot com --- Comment

[Bug c++/53637] NRVO not applied where there are two different variables involved

2016-02-29 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53637 --- Comment #5 from marc at kdab dot com --- You have a very narrow test of NRVO. You're using a completely transparent type, though I give you that defining the copy and move ctors in a separate TU does not change the outcome. At some

[Bug c++/53637] NRVO not applied where there are two different variables involved

2016-02-29 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53637 --- Comment #3 from marc at kdab dot com --- This really should be top priority. But no comment on it for almost three years by GCC devs.

[Bug c++/58055] [meta-bug] RVO / NRVO improvements

2016-02-29 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58055 --- Comment #6 from marc at kdab dot com --- To expand on my previous comment: the compiler is even allowed to elide the copy if that would save a read/write from a volatile object. So I don't see how this can be implemented anywhere excep

[Bug libstdc++/65659] New: STL containers not specialized for pointer value_type

2015-04-02 Thread marc at kdab dot com
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: marc at kdab dot com The STL containers are not specialised for pointer types, leading to tons of duplicated virtually-identical binary code. Example: vector could be implemented in terms of vector

[Bug libstdc++/60621] std::vector::emplace_back generates massively more code than push_back

2015-02-11 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60621 marc at kdab dot com changed: What|Removed |Added Attachment #32429|0 |1 is obsolete

[Bug libstdc++/60621] std::vector::emplace_back generates massively more code than push_back

2015-02-11 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60621 --- Comment #3 from marc at kdab dot com --- Now, what is _really_ weird is that push_back(T&&) _calls_ emplace_back(). I also tried the magic incantation g++ --param large-unit-insns=1 \ --param inline-unit-growth=1

[Bug c++/58055] [meta-bug] RVO / NRVO improvements

2015-02-04 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58055 marc at kdab dot com changed: What|Removed |Added CC||marc at kdab dot com --- Comment

[Bug c++/51571] No named return value optimization while adding a dummy scope

2015-02-04 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51571 marc at kdab dot com changed: What|Removed |Added CC||marc at kdab dot com --- Comment

[Bug c++/53637] NRVO not applied in branches when it could be

2015-02-04 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53637 marc at kdab dot com changed: What|Removed |Added CC||marc at kdab dot com --- Comment

[Bug c++/64150] Missed optimisation opportunity with moved-from pimpl classes and a nullptr d-pointer

2014-12-02 Thread marc at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64150 --- Comment #1 from marc at kdab dot com --- (compiled with g++ -fverbose-asm -std=c++14 -g -O3 -S -o test-moved-from-dtor.{s,cpp})

[Bug c++/64150] New: Missed optimisation opportunity with moved-from pimpl classes and a nullptr d-pointer

2014-12-02 Thread marc at kdab dot com
Severity: enhancement Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc at kdab dot com Created attachment 34162 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34162&action=edit Sample program When compiling a

[Bug libstdc++/60621] std::vector::emplace_back generates massively more code than push_back

2014-03-23 Thread marc at kdab dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60621 --- Comment #2 from marc at kdab dot com --- Yes, that helps a bit, but emplace_back still generates larger code than the corresponding rvalue-push_back. Considering that the latter also needs to generate the implicitly defined move ctor for S