[Bug c++/114309] Undesirable warning with [[unlikely]]

2024-03-12 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114309 --- Comment #11 from M Welinder --- > Anyway, in GCC's testcase we have: > > 9 if (a == 123) > 10 [[likely]] c = 5; // { dg-warning "both" } > 11 else > 12 [[likely]] b = 77; > Here we have two possible paths, and

[Bug c++/114309] Undesirable warning with [[unlikely]]

2024-03-11 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114309 --- Comment #1 from M Welinder --- Created attachment 57672 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57672=edit Preprocessed source code

[Bug c++/114309] New: Undesirable warning with [[unlikely]]

2024-03-11 Thread terra at gnome dot org via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- g++ warns over the following program which uses [[unlikely]] for aborting error reporting and conditionally chooses between two error messages: # /usr/local/products/gcc/13.1.0/bin/g

[Bug libstdc++/113811] New: std::rotate does 64-bit signed division

2024-02-07 Thread terra at gnome dot org via Gcc-bugs
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- In stl_algo.h, function __rotate for RandomAccessIterator lines 1280-1362 for me, there are two divisions of integers: __n %= __k; on lines 1332 and 1356. They look harmless

[Bug middle-end/56888] memcpy implementation optimized as a call to memcpy

2023-12-18 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 --- Comment #48 from M Welinder --- It's your (1). gcc is changing a program that can rely on errno not being changed to one where the C library can change it. (The current C library or any future library that the resulting binary may be

[Bug middle-end/56888] memcpy implementation optimized as a call to memcpy

2023-12-18 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 --- Comment #46 from M Welinder --- Should "-std=c99" imply turning off these optimizations? Creating calls to, say, strlen is incompatible with the C99 standard and perhaps better limited to "-std=gnu-something" or an opt-in f-flag.

[Bug c/112614] New: Compile-time float-to-_Decimal64 fails for -NAN

2023-11-18 Thread terra at gnome dot org via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 56636 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56636=edit Preprocessed source code It looks like compile-time conversion of -NAN and -(double)

[Bug libstdc++/100903] Bogus "zero as null pointer constant" warning

2023-11-16 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100903 --- Comment #11 from M Welinder --- >/home/jwakely/gcc/14/include/c++/14.0.0/compare:160:5: note: declared here > 160 | operator<=>(partial_ordering, __cmp_cat::__not_literal_zero auto) > = delete; > | ^~~~ I don't think we

[Bug libstdc++/112569] New: libstdc++-v3/include/ranges:1456: missing check for self-assignment

2023-11-16 Thread terra at gnome dot org via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- The move assignment operator for _CachedPosition does not check for self-assignment and it is not obviously safe for other

[Bug tree-optimization/102725] -fno-builtin leads to call of strlen since r12-4283-g6f966f06146be768

2023-06-02 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102725 M Welinder changed: What|Removed |Added CC||terra at gnome dot org --- Comment #10

[Bug c++/109909] New: vector: Writing 8 bytes into 1 allocated byte

2023-05-19 Thread terra at gnome dot org via Gcc-bugs
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 55119 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55119=edit Preprocessed source code The following piece of code, when compiled, shows a warn

[Bug libstdc++/109536] New: Failure to compile constexpr std::vector with -D_GLIBCXX_DEBUG

2023-04-17 Thread terra at gnome dot org via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 54875 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54875=edit Preprocessed source code The follow

[Bug libstdc++/109517] New: Failure to compile constexpr std::copy with -D_GLIBCXX_DEBUG

2023-04-14 Thread terra at gnome dot org via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 54861 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54861=edit Preprocessed source code The following prog

[Bug preprocessor/108108] "gcc -MM" fails to list all dependencies

2022-12-14 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108108 --- Comment #4 from M Welinder --- > Since it was not read again, the file is not considered included ... It must have been read -- how else could gcc decide it was the same? # strace -f gcc -MM c.c 2>&1 >Makefile | grep 'open.*\.h' | grep

[Bug other/108108] New: "gcc -MM" fails to list all dependencies

2022-12-14 Thread terra at gnome dot org via Gcc-bugs
Component: other Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- This is a spin-off from bug 52566 #!/bin/sh rm -f a.h b.h c.c c.o Makefile (echo '#pragma once'; echo '// Killroy was here') > a.h cp -p a.h b.h # or even "

[Bug preprocessor/52566] #include with #pragma once and files' contents is the same

2022-12-14 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52566 --- Comment #5 from M Welinder --- >From 108101: Note also: # gcc -MM c.c c.o: c.c a.h No b.h present! I.e., Makefiles built with this will not pick up changes to the second file.

[Bug preprocessor/108101] "#pragma once" causes other files not be included

2022-12-14 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108101 --- Comment #3 from M Welinder --- Note also: # gcc -MM c.c c.o: c.c a.h No b.h present!

[Bug preprocessor/108101] New: "#pragma once" causes other files not be included

2022-12-14 Thread terra at gnome dot org via Gcc-bugs
iority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- # (echo '#pragma once'; echo 'Killroy was here') > a.h # (echo '#pragma once'; echo 'Killroy was here') > b.h # (echo '#include "a.h"'; ec

[Bug target/105960] Crash in 32-bit mode

2022-06-13 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105960 --- Comment #4 from M Welinder --- And added to the link lines too, btw.

[Bug target/105960] Crash in 32-bit mode

2022-06-13 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105960 M Welinder changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID

[Bug c/105960] New: Crash in 32-bit mode

2022-06-13 Thread terra at gnome dot org via Gcc-bugs
: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 53130 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53130=edit Source files and compile script The attached archive shows a crash when running 32-bit binaries compiled with

[Bug c++/103084] Accepts invalid using enum declaration with an invalid elaborated-type-specifier

2021-11-05 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103084 --- Comment #9 from M Welinder --- I went back and looked at the proposal's revision history. TLDR: this just adds to the confusion. r3 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1099r3.html): * I read it as allowing "using

[Bug c++/103084] Accepts invalid using enum declaration with an invalid elaborated-type-specifier

2021-11-04 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103084 --- Comment #7 from M Welinder --- Maybe kick it up to the C++ people? Note, that if the code is not allowed then a type alias is no longer as powerful as the original type. I really doubt that was intended.

[Bug c++/103084] Accepts invalid using enum declaration with an invalid elaborated-type-specifier

2021-11-04 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103084 --- Comment #6 from M Welinder --- elaborated-enum-specifier can be a elaborated-type-specifier. It is in the "enum Hog H;" case. But elaborated-enum-specifier is NOT an elaborated-type-specifier in the "using enum Hog;" case, See

[Bug c++/103084] Accepts invalid using enum declaration with an invalid elaborated-type-specifier

2021-11-04 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103084 --- Comment #3 from M Welinder --- I actually think gcc is right there. http://eel.is/c++draft/dcl.type.elab#nt:elaborated-enum-specifier There are requirements for elaborated-type-specifier, but none for elaborated-enum-specifier. It's a

[Bug c++/103087] New: "using enum" possibly incorrectly accepted

2021-11-04 Thread terra at gnome dot org via Gcc-bugs
mponent: c++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- See https://bugs.llvm.org/show_bug.cgi?id=52403 enum class Pig { Oink }; using Hog = Pig; using enum Hog; gcc 11.1 accepts this code. clang13 does n

[Bug c++/103081] [ICE] with "using enum"

2021-11-04 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103081 --- Comment #4 from M Welinder --- That version of clang does not do "using enum" at all. clang 13 accepts this code, but it has other issues with "using enum".

[Bug c++/103081] New: [ICE] with "using enum"

2021-11-04 Thread terra at gnome dot org via Gcc-bugs
mponent: c++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- This code triggers an internal compiler error. enum class Pig { OINK }; struct Hog { using enum Pig; Hog(Pig) { } }; template

[Bug libstdc++/100903] Bogus "zero as null pointer constant" warning

2021-06-04 Thread terra at gnome dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100903 --- Comment #2 from M Welinder --- IMHO, nullptr_t would not be an improvement here. We would still have the combination of: (1) Correct usage causing a warning (2) The warning hinting at using the incorrect nullptr instead. (3) po>> bool

[Bug libstdc++/100903] New: Bogus "zero as null pointer constant" warning

2021-06-04 Thread terra at gnome dot org via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 50926 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50926=edit Preprocesses source code g++ emits a bogus warning when a std::par

[Bug libstdc++/99876] New: std::filesystem::absolute is inefficient

2021-04-01 Thread terra at gnome dot org via Gcc-bugs
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 50498 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50498=edit Preprocesses source code The documentation for std::filesystem::absolute sta

[Bug c++/96570] Warnings desired for time_t to int coversions

2020-08-11 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96570 --- Comment #4 from M Welinder --- > Explicit casts don't, and that's what I was questioning. They most certainly do. That's an empirical statement from having gone over a fairly large code base. It is not a statement that they should occur

[Bug c++/96570] Warnings desired for time_t to int coversions

2020-08-11 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96570 --- Comment #2 from M Welinder --- > Why? If somebody wants to be explicitly stupid, that's their prerogative. I agree with the second sentence. However, casts are not a clear indication that somebody wants to be explicitly stupid, at least

[Bug c++/96570] New: Warnings desired for time_t to int coversions

2020-08-11 Thread terra at gnome dot org
++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- This is a wishlist item. It's filed for C++ but would apply to C too. It would be useful to have some mechanism to cause warnings to be emitted at compile-time when values

[Bug libstdc++/96484] Horrible performance of std::read_symlink

2020-08-05 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96484 --- Comment #1 from M Welinder --- I should note that not only does it allocate 500M, it also zeroes it.

[Bug libstdc++/96484] New: Horrible performance of std::read_symlink

2020-08-05 Thread terra at gnome dot org
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 49004 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49004=edit Preprocessed ttt.C This program takes ~0.25s per round in the loop for a to

[Bug c++/96282] internal compiler error: in output_constructor_regular_field

2020-07-22 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96282 --- Comment #1 from M Welinder --- Created attachment 48916 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48916=edit preprocessed test program

[Bug c++/96282] New: internal compiler error: in output_constructor_regular_field

2020-07-22 Thread terra at gnome dot org
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 48915 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48915=edit shawn.C With to-be-attached program I get an inter

[Bug libstdc++/95547] New: gdb pretty-printing of std::unique_ptr less helpful than it could be

2020-06-04 Thread terra at gnome dot org
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 48680 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48680=edit Preprocessed ttt.C C++ smart-poin

[Bug libstdc++/95209] std::filesystem::path::lexically_normal mangles "//foo"

2020-05-21 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95209 --- Comment #4 from M Welinder --- Sorry about the missing "-v". It is indeed a x86_64-suse-linux system. (It's not internet facing or I'd go get the full output.) "Implementation defined", yes, but the implementation is the os, not the

[Bug libstdc++/95209] std::filesystem::path::lexically_normal mangles "//foo"

2020-05-19 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95209 --- Comment #1 from M Welinder --- Created attachment 48567 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48567=edit preprocessed test program

[Bug libstdc++/95209] New: std::filesystem::path::lexically_normal mangles "//foo"

2020-05-19 Thread terra at gnome dot org
ty: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 48566 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48566=edit test program lexically_normal tran

[Bug libstdc++/90612] std::filesystem::path crash

2019-05-24 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90612 --- Comment #1 from M Welinder --- fs_path.cc line 281 reads... std::uninitialized_copy (to + oldsize, new_size - oldsize, from + oldsize); 1st and 3rd arguments are swapped.

[Bug libstdc++/90612] New: std::filesystem::path crash

2019-05-24 Thread terra at gnome dot org
++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 46404 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46404=edit Preprocessed source code # /usr/local/products/gcc/9.1.0/bin/g++ -std=gnu++2a -Wl,-rpath,/usr/lo

[Bug c++/90102] New: Incorrect ambiguous overload with _GLIBCXX_DEBUG

2019-04-15 Thread terra at gnome dot org
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 46170 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46170=edit Preprocessed source code The following code fails to compile with the debugging vers

[Bug libstdc++/61582] C++11 regex memory corruption

2019-02-21 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61582 M Welinder changed: What|Removed |Added CC||terra at gnome dot org --- Comment #22

[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2018-10-05 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 --- Comment #7 from M Welinder --- Actually, it's more like 50+ instructions for destructing the string that never (or almost never) needs destructing. 16 of those appear to need linker fixup. Sample for the C++14 mode: call

[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2018-10-05 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 --- Comment #6 from M Welinder --- > const_cast(s)="some longer string so it needs proper deletion"; Is that really valid? This comes down to whether the temporary object creating with the function call is constant [in which case the above is

[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2018-10-04 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 --- Comment #2 from M Welinder --- Created attachment 44789 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44789=edit Proof-on-concept patch This proof-of-concept improves the situation dramatically. I don't know if it is actually

[Bug c++/87502] New: Poor code generation for std::string("c-style string")

2018-10-03 Thread terra at gnome dot org
iority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 44776 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44776=edit Preprocessed source code It appears that gcc is creating quite poor

[Bug demangler/86152] New: Failure to demange clone names with digits

2018-06-14 Thread terra at gnome dot org
: demangler Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- See https://sourceware.org/bugzilla/show_bug.cgi?id=23283 which is the same issue filed for gdb. There is a patch over there too. The demangler fails to demangle the symbol

[Bug c/85419] New: Incorrect determination of null pointer constant

2018-04-16 Thread terra at gnome dot org
: c Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 43949 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43949=edit Preprocessed source code Priority: low #include int main (int argc,char **a

[Bug libstdc++/80893] New: std::vector creation dereferences null pointer

2017-05-26 Thread terra at gnome dot org
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 41426 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41426=edit g++ -E output, just in case it's needed It looks like copying a pristine vec

[Bug c/77292] Spurious "warning: logical not is only applied to the left hand side of comparison"

2016-08-19 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292 --- Comment #3 from M Welinder --- The actual code I got this warning from was... if (!lower_tail == (p > phalf)) { where lower_tail is an int and p and phalf are doubles. That's simply a comparison of two booleans. Note,

[Bug c/77292] New: Spurious "warning: logical not is only applied to the left hand side of comparison"

2016-08-18 Thread terra at gnome dot org
NCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- The warning introduced in bug 62183 is trigger-happy. int foo (int a, int b) { // Make it obvious that these ar

[Bug c++/71497] New: Warning text for -Wmisleading-indentation

2016-06-10 Thread terra at gnome dot org
++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- "...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'" --> "[...] as if it were [...]" The guarding is hypothetical, s

[Bug c++/71472] New: Wlogical-op misses exhaustive-or case (... || A) || B

2016-06-09 Thread terra at gnome dot org
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- g++ 6.1 fails to complain about "bar" below. The other two get the expected "logical 'or' of collectively exhaustive tests is always true" warning.

[Bug c++/71393] [6.1 Regression] Compilation hang

2016-06-02 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71393 --- Comment #3 from M Welinder --- Bug 70847 claims "virtual" is necessary, so that is probably unrelated. This bug is "virtual"-free.

[Bug c++/71393] [6.1 Regression] Compilation hang

2016-06-02 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71393 --- Comment #1 from M Welinder --- Created attachment 38631 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38631=edit Preprocessed version of MyClass.C

[Bug c++/71393] New: [6.1 Regression] Compilation hang

2016-06-02 Thread terra at gnome dot org
++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 38630 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38630=edit MyClass.C g++ -fsanitize=undefined -Wall -c -g -O2 MyClass.C [hangs] This didn't happen in

[Bug libstdc++/67554] New: runtime error in valarray (NULL passed to memcpy)

2015-09-11 Thread terra at gnome dot org
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Target Milestone: --- Created attachment 36325 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36325=edit Preprocessed source code # /usr/local/products/gcc/5.2.0/bin/g++ -fsanit

[Bug c/63645] Incorrect code generation

2014-10-27 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645 --- Comment #14 from M Welinder terra at gnome dot org --- 1) Your malloc is too small. It has to be sizeof (biggest member). So you're invoking undefined behavior. Can you produce a specific authoritative reference for that statement? I.e

[Bug c/63645] Incorrect code generation

2014-10-27 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645 --- Comment #15 from M Welinder terra at gnome dot org --- FYI, I filed a related bug for valgrind covering the problem with the conditional jump being detected as undefined: https://bugs.kde.org/show_bug.cgi?id=340392

[Bug c/63645] Incorrect code generation

2014-10-27 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645 --- Comment #17 from M Welinder terra at gnome dot org --- You keep saying undefined behaviour, but you keep avoiding substantiating that claim. Where, in the C99 standard, is the clause that makes things undefined?

[Bug c/63645] Incorrect code generation

2014-10-27 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645 --- Comment #18 from M Welinder terra at gnome dot org --- The example at strict-aliasing in the gcc man page covers a different situation: you don't get to access a double via an int. I get it. But the standard says that in certain

[Bug c/63645] Incorrect code generation

2014-10-27 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645 --- Comment #22 from M Welinder terra at gnome dot org --- Given GnmExprBinary res; GnmExpr const *expr = (GnmExpr *)res; the C standard does not define where the result of the conversion points; How do you read C99's Section 6.5 #7

[Bug c/63645] Incorrect code generation

2014-10-26 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645 M Welinder terra at gnome dot org changed: What|Removed |Added Attachment #33809|0 |1 is obsolete

[Bug c/63645] New: Incorrect code generation

2014-10-25 Thread terra at gnome dot org
: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Created attachment 33809 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33809action=edit Test program I am observing valgrind errors from the to-be-attached reduced test case. The oper test on line 36 should fail

[Bug c/63645] Incorrect code generation

2014-10-25 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645 --- Comment #1 from M Welinder terra at gnome dot org --- Created attachment 33810 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33810action=edit Preprocessed version of the program

[Bug c/63645] Incorrect code generation

2014-10-25 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645 --- Comment #3 from M Welinder terra at gnome dot org --- Why do you think so? I think it is covered by this: 6.5 Expressions [...] [#7] An object shall have its stored value accessed only by an lvalue expression that has one

[Bug c/63645] Incorrect code generation

2014-10-25 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645 M Welinder terra at gnome dot org changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED

[Bug c/63645] Incorrect code generation

2014-10-25 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645 --- Comment #8 from M Welinder terra at gnome dot org --- That is a different issue. You access expr-func.argc and expr-func.func in your if expression. And of course they are uninitialised. No, I don't. You see, C has this feature

[Bug c++/63295] New: Insane memory use

2014-09-18 Thread terra at gnome dot org
: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Compiling the (nonsense) program: class x class xx(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x( prints one error and starts using insane amounts of memory. GBs worth of it. gcc version 4.8.1

[Bug libstdc++/62169] map iterators under _GLIBCXX_DEBUG diverge

2014-08-23 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169 --- Comment #5 from M Welinder terra at gnome dot org --- I agree that anyone depending on map and multimap iterators to mix deserves whatever happens as a result. It would, however, be nice g++ would reject such programs outright. Currently

[Bug libstdc++/62169] New: map iterators under _GLIBCXX_DEBUG diverge

2014-08-18 Thread terra at gnome dot org
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org The two types std::mapint,int::iterator std::mapconst int,int::iterator are the same when compiled normally, but different under _GLIBCXX_DEBUG. I actually don't know if the standard allows

[Bug libstdc++/62169] map iterators under _GLIBCXX_DEBUG diverge

2014-08-18 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169 --- Comment #1 from M Welinder terra at gnome dot org --- Created attachment 33346 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33346action=edit Preprocessed source code for normal case

[Bug libstdc++/62169] map iterators under _GLIBCXX_DEBUG diverge

2014-08-18 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169 --- Comment #2 from M Welinder terra at gnome dot org --- Created attachment 33347 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33347action=edit Preprocessed source code for debug case

[Bug libstdc++/62169] map iterators under _GLIBCXX_DEBUG diverge

2014-08-18 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169 --- Comment #3 from M Welinder terra at gnome dot org --- A similar divergence of types occurs between the types std::mapint,int::iterator std::multimapint,int::iterator

[Bug middle-end/56888] memcpy implementation optimized as a call to memcpy

2014-06-06 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 M Welinder terra at gnome dot org changed: What|Removed |Added CC||terra at gnome dot

[Bug c/59089] New: sin and/or cos produce bogus results with -O2

2013-11-12 Thread terra at gnome dot org
Assignee: unassigned at gcc dot gnu.org Reporter: terra at gnome dot org Created attachment 31199 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31199action=edit sc.c welinder@sherwood:~ gcc --version gcc (SUSE Linux) 4.7.1 20120723 [gcc-4_7-branch revision 189773] When sin

[Bug c/59089] sin and/or cos produce bogus results with -O2

2013-11-12 Thread terra at gnome dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59089 --- Comment #1 from M Welinder terra at gnome dot org --- Version and arch details: welinder@sherwood:~ gcc -v -Wall -O0 sc.c -lm Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.7/lto-wrapper Target

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread terra at gnome dot org
--- Comment #4 from terra at gnome dot org 2009-11-03 13:47 --- I'm not sure whether using A in a union causes the implicitly-declared copy assignment operator to be implicitly defined, but that seems to be what's happening. No, that's not quite it. The requirement for union

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread terra at gnome dot org
--- Comment #6 from terra at gnome dot org 2009-11-03 17:44 --- cp/class.c has code like this: /* If any field is const, the structure type is pseudo-const. * / if (CP_TYPE_CONST_P (type)) { ... /* ARM $12.6.2: [A member initializer list] (or, for an aggregate

[Bug c++/39934] New: Union member incorrectly disallowed

2009-04-27 Thread terra at gnome dot org
ReportedBy: terra at gnome dot org GCC host triplet: x86_64-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39934

[Bug preprocessor/39603] New: Incorrect C++ style comments error

2009-03-31 Thread terra at gnome dot org
ReportedBy: terra at gnome dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39603

[Bug libstdc++/39547] New: deque::erase invalidates end()

2009-03-24 Thread terra at gnome dot org
gnu dot org ReportedBy: terra at gnome dot org GCC target triplet: x86_64-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39547

[Bug c/36989] New: Wrong type for (... ? ... : ...)

2008-07-31 Thread terra at gnome dot org
for (... ? ... : ...) Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: terra at gnome dot org GCC build triplet: i686-pc-linux-gnu GCC host

[Bug c/33859] New: Bogus discards qualifiers warning

2007-10-22 Thread terra at gnome dot org
AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: terra at gnome dot org GCC host triplet: i686-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33859

[Bug c/30153] New: -fPIC failure

2006-12-11 Thread terra at gnome dot org
this. -- Summary: -fPIC failure Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: terra at gnome dot org GCC build triplet: x86_64

[Bug c/30128] New: Strange code generated

2006-12-08 Thread terra at gnome dot org
: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: terra at gnome dot org GCC build triplet: i586-suse-linux GCC host triplet: i586-suse-linux GCC target triplet: i586-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30128

[Bug c/25975] New: Problems with -ffast-math and isnan

2006-01-26 Thread terra at gnome dot org
gnu dot org ReportedBy: terra at gnome dot org GCC build triplet: 686-pc-linux-gnu GCC host triplet: 686-pc-linux-gnu GCC target triplet: 686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25975

[Bug c/25975] Problems with -ffast-math and isnan

2006-01-26 Thread terra at gnome dot org
--- Comment #1 from terra at gnome dot org 2006-01-26 14:43 --- Created an attachment (id=10732) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10732action=view) Output from gcc-4.0.2 -E -ffast-math nan.c gcc-4.0.2 -v Using built-in specs. Target: i686-pc-linux-gnu Configured

[Bug c/25975] Problems with -ffast-math and isnan

2006-01-26 Thread terra at gnome dot org
--- Comment #4 from terra at gnome dot org 2006-01-26 17:22 --- ok, thanks. I'll prevent this by checking for __FAST_MATH__ in my code. One could argue for a warning like nan.c:13: warning: comparison is always false due to limited range of data type for use of isnan and similarly

[Bug c/19430] New: Missing warning

2005-01-13 Thread terra at gnome dot org
Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: terra at gnome dot org CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: sparc-sun-solaris2.8, i586-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19430

[Bug c/18740] New: Execution-time sizeof drops side effects

2004-11-30 Thread terra at gnome dot org
: Execution-time sizeof drops side effects Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: terra at gnome dot org

[Bug c/18183] New: Warning when supposedly unused parameters are used

2004-10-27 Thread terra at gnome dot org
are used Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: terra at gnome dot org CC: gcc-bugs at gcc dot