[Bug libstdc++/59027] New: std::is_signed does not include check for is_arithmetic

2013-11-06 Thread marc.mutz at kdab dot com
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com According to N3797 Table 49, both is_signed and is_unsigned should evaluate to true_type only if the argument is_arithmetic, too. is_unsigned honours

[Bug libstdc++/59027] std::is_signed does not include check for is_arithmetic

2013-11-07 Thread marc.mutz at kdab dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59027 Marc Mutz marc.mutz at kdab dot com changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED

[Bug c++/58389] New: g++ ICE in ipa_find_reference

2013-09-11 Thread marc.mutz at kdab dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Created attachment 30796 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30796action=edit Preprocessed source (compressed to fit into file size limit) Compiling master Qt with the trunk version of g++: Command: g

[Bug c++/79433] New: __has_include reports wrong result headers that #error on __cplusplus

2017-02-08 Thread marc.mutz at kdab dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- Code that attempts to detect, say, string_view support by __has_include() or __has_include() and then attempts to #include those

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #5 from Marc Mutz --- Andrew, you're taking the easy way out. It might be that it works as implemented, but that behaviour is useless. Please explain how one should detect, in a portable way, whether string_view and

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #1 from Marc Mutz --- And no, checking __cplusplus in addition is not an option, since many compilers, GCC included (__cplusplus==1, remember?), do not necessarily bump __cplusplus when they implement enough core features to make

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #2 from Marc Mutz --- Ok, there is __cpp_lib_experimental_string_view, at least, but it's defined ... wait for it ... in , which you can't include.

[Bug c++/79564] New: [missed optimization][x86] relaxed atomic counting compiled the same as seq_cst

2017-02-16 Thread marc.mutz at kdab dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- I believe that the following code (https://godbolt.org/g/81DcP8): #include int count_relaxed(const char *str

[Bug libstdc++/79433] __has_include does not conform to SD-6

2017-02-09 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #11 from Marc Mutz --- Fair enough. Sorry for filing it under the wrong component.

[Bug c++/79561] New: Missed optimization: useless guards for zero-initialized POD statics at function scope.

2017-02-16 Thread marc.mutz at kdab dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- Example code: BEGIN #include #include template class BasicAtomic { public: std::atomic v

[Bug c++/79561] Missed optimization: useless guards for zero-initialized POD statics at function scope.

2017-02-16 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79561 --- Comment #1 from Marc Mutz --- For a moment, I thought it was about std::atomic, but a simple template container { T t; } instead of std::atomic produces the same result. So it seems like the = default ctor is the problem. If I remove

[Bug c++/78940] [missed optimization] Useless guard variable in thread_local defaulted constructor

2017-02-16 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78940 Marc Mutz changed: What|Removed |Added CC||marc.mutz at kdab dot com --- Comment #3

[Bug c++/79433] __has_include reports wrong result for std headers that #error on __cplusplus

2017-02-08 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 Marc Mutz changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID

[Bug libstdc++/79433] __has_include() is true but #include gives #error when -std=old

2017-02-09 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #14 from Marc Mutz --- You can hide behind the letter of the standard, but you cannot escape the simple fact that __has_include is the intended mechanism to check for library features that added a new header. Proof: You need to

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

2016-10-07 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 Marc Mutz changed: What|Removed |Added CC||marc.mutz at kdab dot com --- Comment #13

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

2016-10-07 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #14 from Marc Mutz --- More examples (incl. ones with .Lubsan_type3) available on request.

[Bug c/77886] -Wimplicit-fallthrough: breaks duff's device

2016-10-07 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77886 --- Comment #5 from Marc Mutz --- It's in a function template, in case that helps. I'll try to trim it down now.

[Bug c++/77886] -Wimplicit-fallthrough: breaks duff's device (in function templates)

2016-10-07 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77886 --- Comment #7 from Marc Mutz --- Version: $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/d/gcc/trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with:

[Bug c/77886] -Wimplicit-fallthrough: breaks duff's device

2016-10-07 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77886 --- Comment #6 from Marc Mutz --- Created attachment 39770 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39770=edit Test case Result: $ g++ -Wextra -std=c++1z -O2 bug.cpp bug.cpp: In function ‘void qt_memfill(T*, T, int) [with T =

[Bug c++/77886] -Wimplicit-fallthrough: breaks duff's device (in function templates)

2016-10-07 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77886 --- Comment #8 from Marc Mutz --- #c3 is also in a template, indeed.

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

2016-10-07 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #12 from Marc Mutz --- Created attachment 39768 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39768=edit Preprocessed source for PCH Command line for PCH file: g++ -pipe -g -O3 -std=c++1z \ -I/usr/include/glib-2.0 \

[Bug c++/77887] -Wimplicit-fallthrough fails to trigger in an unused function template specialisation

2016-10-07 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77887 --- Comment #2 from Marc Mutz --- Created attachment 39772 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39772=edit Expanded version of test-case for 77886, adding an unused inline non-template overload of the function template Findings:

[Bug c++/77886] -Wimplicit-fallthrough: breaks duff's device (in function templates)

2016-10-07 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77886 --- Comment #10 from Marc Mutz --- I can confirm patch fixes my Qt build, ie. not just bug.cpp. Thanks!

[Bug c/77817] -Wimplicit-fallthrough: cpp directive renders FALLTHRU comment ineffective

2016-10-09 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817 Marc Mutz changed: What|Removed |Added CC||marc.mutz at kdab dot com --- Comment #8

[Bug c/77886] -Wimplicit-fallthrough: breaks duff's device

2016-10-06 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77886 --- Comment #3 from Marc Mutz --- Here's another example of a switch where I can't silence the warning, except by C++11 attribute: switch (i & 7) { case 7: blender.write(line, reinterpret_cast(reinterpret_cast(srcPixels) + (v >> 16) *

[Bug c++/77887] New: -Wimplicit-fallthrough fails to trigger in an unused function template specialisation

2016-10-06 Thread marc.mutz at kdab dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- I have a switch statement here that -Wimplicit-fallthrough fails to warn about: template <> inlin

[Bug c/77886] -Wimplicit-fallthrough: breaks duff's device

2016-10-06 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77886 --- Comment #2 from Marc Mutz --- It's worse than I thought: int n = (count + 7) / 8; switch (count & 0x07) { case 0: do { *dest++ = value; // fall through case 7: *dest++ = value; // fall through

[Bug c/77886] New: -Wimplicit-fallthrough: breaks duff's device

2016-10-06 Thread marc.mutz at kdab dot com
Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- The recent addition (or activation) of -Wimplicit-fallthrough breaks Duff's Device: int n = (count + 7) / 8; switch (count & 0x07) { case 0: do { *dest++ = v

[Bug c/77909] New: -Wimplicit-fallthrough: accept more comment variants

2016-10-09 Thread marc.mutz at kdab dot com
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- In QtBase, we have several unrecognised forms of fall-through comments, which are quite common, and probably should be recognized, too: - interpunctation: "fall th

[Bug c/77817] -Wimplicit-fallthrough: cpp directive renders FALLTHRU comment ineffective

2016-10-12 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817 --- Comment #12 from Marc Mutz --- Is replacing a matching comment with __attribute__(fallthrough)) so complicated as to make this a wontfix?

[Bug c++/78434] Incorrect warning about missing align_val_t for placement new

2016-11-22 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78434 --- Comment #3 from Marc Mutz --- Possibly. I couldn't check later versions because trunk failed to compile for me in i386.c.

[Bug c++/78567] New: GCC trunk fails to compile all-stage2-gcc in i386.c

2016-11-28 Thread marc.mutz at kdab dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- Last successful built was 5th of October (yielding gcc version 7.0.0 20161005 (experimental) (GCC)), this failure persists since somewhen around the beginning of November

[Bug c++/78567] GCC trunk fails to compile all-stage2-gcc in i386.c

2016-11-28 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78567 --- Comment #1 from Marc Mutz --- Also happens on a fresh configure.

[Bug c++/78434] New: Incorrect warning about missing align_val_t for placement new

2016-11-20 Thread marc.mutz at kdab dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- GCC incorrectly warns about a missing std::align_val_t argument on a placement-new expression: qtbase-5.6/src/corelib/tools/qvector.h:663:5

[Bug c++/78434] Incorrect warning about missing align_val_t for placement new

2016-11-20 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78434 --- Comment #1 from Marc Mutz --- Created attachment 40089 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40089=edit Testcase, compile with g++ -Wall -o 78434{,.cpp} Actual Output: 78434.cpp:11:30: warning: ‘new’ of type ‘Align128’

[Bug target/78567] [7 Regression] GCC trunk fails to compile all-stage2-gcc in i386.c with x32 enabled

2016-12-19 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78567 Marc Mutz changed: What|Removed |Added Status|RESOLVED|VERIFIED --- Comment #4 from Marc Mutz ---

[Bug c++/78858] New: Bogus -Wnonnull warning involving strcmp.

2016-12-19 Thread marc.mutz at kdab dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- Latest trunk emits spurious -Wnonnull warnings, eg. in Qt: qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp: In member function ‘void QCoreApplicationPrivate

[Bug c++/78858] Bogus -Wnonnull warning involving strcmp.

2016-12-19 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78858 --- Comment #2 from Marc Mutz --- Created attachment 40366 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40366=edit Preprocessed source Command line used: g++ -E -pipe -ffunction-sections -O2 -g -fPIC -std=c++1z -fno-exceptions

[Bug c++/78858] Bogus -Wnonnull warning involving strcmp.

2016-12-19 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78858 --- Comment #3 from Marc Mutz --- $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/d/gcc/trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure

[Bug c++/78858] [7 Regression] Bogus -Wnonnull warning involving strcmp with -fsanitize=undefined

2016-12-19 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78858 --- Comment #5 from Marc Mutz --- Created attachment 40368 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40368=edit Another TU that has an unfixable -Wnonnull warning g++ -c -pipe -ffunction-sections -O2 -g -fPIC -std=c++1z

[Bug c++/78858] [7 Regression] Bogus -Wnonnull warning involving strcmp with -fsanitize=undefined

2016-12-19 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78858 --- Comment #6 from Marc Mutz --- Ah, I see.

[Bug middle-end/69008] gcc emits unneeded memory access when passing trivial structs by value (ARM)

2017-03-09 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69008 Marc Mutz changed: What|Removed |Added CC||marc.mutz at kdab dot com --- Comment #5

[Bug middle-end/81194] [8 Regression] ICE during RTL pass: expand

2017-06-29 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81194 --- Comment #15 from Marc Mutz --- FWIW, the patch fixes the ICE for me, too.

[Bug libstdc++/79433] __has_include() is true but #include gives #error when -std=old

2017-05-11 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79433 --- Comment #22 from Marc Mutz --- (In reply to Jonathan Wakely from comment #18) > I've started a discussion about changing the SD-6 recommendations. > > One idea that came out of the discussion so far would be to make a > GCC-specific

[Bug rtl-optimization/81194] New: ICE during RTL pass: expand

2017-06-23 Thread marc.mutz at kdab dot com
Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- Created attachment 41622 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41622=edit compressed preprocessed source during RTL pass: expand In file included from /home/marc/Qt/

[Bug rtl-optimization/81194] ICE during RTL pass: expand

2017-06-23 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81194 --- Comment #1 from Marc Mutz --- $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/d/gcc/trunk/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure

[Bug rtl-optimization/81194] [8 Regression] ICE during RTL pass: expand

2017-06-26 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81194 --- Comment #6 from Marc Mutz --- Sorry. Here it comes: make[2]: Entering directory '/home/marc/Qt/qt5-build/qtdeclarative/src/qmldevtools' g++ -c -pipe -Wno-error=expansion-to-defined -Wno-error=maybe-uninitialized

[Bug c++/82193] incorrectly rejects int x; struct { decltype(x) x; } f = {x};

2017-09-12 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82193 --- Comment #2 from Marc Mutz --- Basically: because the other two compilers compile it.

[Bug c++/82193] New: incorrectly rejects int x; struct { decltype(x) x; } f = {x};

2017-09-12 Thread marc.mutz at kdab dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- This code: void fun() { constexpr int x = 42; constexpr struct { decltype(x) x; constexpr auto operator()(int

[Bug c/77817] -Wimplicit-fallthrough: cpp directive renders FALLTHRU comment ineffective

2017-09-28 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817 --- Comment #15 from Marc Mutz --- (In reply to Jakub Jelinek from comment #13) > (In reply to Marc Mutz from comment #12) > > Is replacing a matching comment with __attribute__(fallthrough)) so > > complicated as to make this a wontfix? > > It

[Bug libstdc++/82716] New: struct/class vs. tuple_element/tuple_size

2017-10-25 Thread marc.mutz at kdab dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- I'm trying to support the tuple protocol for Qt's QPair: namespace std { // these have to be 'class', because MSVC warns about struct/class mismatch, and // in the std

[Bug c++/96805] ICE: Segmentation fault in instantiate_template / pop_nested_class()

2020-08-26 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96805 --- Comment #2 from Marc Mutz --- also in gcc version 10.2.1 20200826 (GCC)

[Bug c++/96805] ICE: Segmentation fault in instantiate_template / pop_nested_class()

2020-08-26 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96805 --- Comment #1 from Marc Mutz --- $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/d/gcc/10/libexec/gcc/x86_64-pc-linux-gnu/10.2.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/d/gcc/10

[Bug c++/96805] New: ICE: Segmentation fault in instantiate_template / pop_nested_class()

2020-08-26 Thread marc.mutz at kdab dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- Created attachment 49134 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49134=edit BZ2-compressed preprocessed source ht

[Bug libstdc++/101406] poor codegen for shared_ptr copy & destory, compared to boost::shared_ptr and libc++'s implementation

2021-07-11 Thread marc.mutz at kdab dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101406 --- Comment #1 from Marc Mutz --- Comparison to the other two major standard library implementations: https://godbolt.org/z/crPo44rxo

[Bug libstdc++/101406] poor codegen for shared_ptr copy & destory, compared to boost::shared_ptr and libc++'s implementation

2021-07-12 Thread marc.mutz at kdab dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101406 Marc Mutz changed: What|Removed |Added Resolution|WONTFIX |FIXED --- Comment #3 from Marc Mutz ---

[Bug libstdc++/101406] New: shared_ptr in _S_atomic mode still uses __atomic_add_dispatch()

2021-07-10 Thread marc.mutz at kdab dot com via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: marc.mutz at kdab dot com Target Milestone: --- Consider // https://godbolt.org/z/efTW6MoEh void test_copy(const std::shared_ptr ) { auto copy = sp; } vs