[Bug c++/106940] New: Feature request: -Wsuggest-noexcept and -Wsuggest-explicit

2022-09-14 Thread felix.von.s at posteo dot de via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- When writing classes, I routinely tend to forget that constructors can be used for implicit conversions, unless marked explicit. I also

[Bug c++/88050] Add a warning for breaking the "Rule of Three"

2022-02-10 Thread felix.von.s at posteo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88050 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #4

[Bug tree-optimization/101050] New: Range comparisons with more significant bits constant are not optimised into masked equality tests

2021-06-13 Thread felix.von.s at posteo dot de via Gcc-bugs
: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Target: x86_64-linux-gnu Created attachment 50995 --> ht

[Bug c++/100681] New: [[noreturn]] attribute can be applied to parameters of function type with strange results

2021-05-19 Thread felix.von.s at posteo dot de via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Created attachment 50845 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50845&action=edit

[Bug tree-optimization/96672] New: Missing -Wclobbered diagnostic, or: __attribute__((returns_twice)) does not inhibit constant folding across call site

2020-08-18 Thread felix.von.s at posteo dot de
: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Created attachment 49072 --> ht

[Bug tree-optimization/95799] Assumed conjunctions are not broken down into clauses if their pureness is checked first

2020-06-22 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95799 --- Comment #1 from felix --- Created attachment 48767 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48767&action=edit Sample program I was pretty sure I attached this before. Never mind, here it is.

[Bug tree-optimization/95810] New: Spurious UBSan warning when computing the opposite of the absolute value of INT_MIN

2020-06-22 Thread felix.von.s at posteo dot de
Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- When the expression (x <= 0 ? x : -x) with x having type int is compiled with -fsanitize=undefined

[Bug tree-optimization/95801] New: Optimiser does not exploit the fact that an integer divisor cannot be zero

2020-06-21 Thread felix.von.s at posteo dot de
: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- int always1(int a, int b) { if (a / b) return b != 0

[Bug tree-optimization/95799] New: Assumed conjunctions are not broken down into clauses if their pureness is checked first

2020-06-21 Thread felix.von.s at posteo dot de
Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- In the attached sample, foo is compiled into returning a

[Bug c/93031] Wish: When the underlying ISA does not force pointer alignment, option to make GCC not assume it

2020-05-13 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93031 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #4

[Bug tree-optimization/94818] New: GCC emits dead bodies of functions whose all calls have been eliminated by optimisations

2020-04-28 Thread felix.von.s at posteo dot de
Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Target: x86_64-linux-gnu In this code

[Bug tree-optimization/94757] New: GCC does not optimise unsigned multiplication known not to overflow

2020-04-25 Thread felix.von.s at posteo dot de
-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- This code: #include unsigned f(unsigned x) { if (x

[Bug other/79469] Feature request: provide `__builtin_assume` builtin function to allow more aggressive optimizations and to match clang

2020-04-17 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79469 --- Comment #2 from felix --- I realised recently that this is already expressible: #define __builtin_assume(expr) \ (__builtin_pure_p(expr) \ ? ((expr) \ ? (void) 0 \ : __builtin_unreachable()) \ : (v

[Bug c/6906] warn about asserts with side effects

2020-04-16 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6906 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #9 from

[Bug c/94389] __attribute__((warn_unused_result)) will warn if the result is discarded as an optimisation

2020-03-30 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94389 --- Comment #6 from felix --- I don’t mind the transformation being applied. I think it is entirely sound and may be beneficial; I imagine it may be harder to allocate registers for the naïve translation of (foo() ? X : X) than it is for (foo(),

[Bug c/94389] New: __attribute__((warn_unused_result)) will warn if the result is discarded as an optimisation

2020-03-29 Thread felix.von.s at posteo dot de
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- With the code below, the compiler warns about an unused result, even though the result is used: #define

[Bug c/94081] -Waddress-of-packed-member doesn’t take variable attributes or __builtin_assume_aligned into account

2020-03-27 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94081 My initial report text was apparently lost in the Bugzilla migration, so here I am submitting it again. In this code: #include struct foo { uint16_t a, b; } __attribute__((packed)); extern struct foo *f(void);

[Bug other/79469] Feature request: provide `__builtin_assume` builtin function to allow more aggressive optimizations and to match clang

2020-03-27 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79469 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #1

[Bug c/94081] New: -Waddress-of-packed-member doesn’t take variable attributes or __builtin_assume_aligned into account

2020-03-06 Thread felix.von.s at posteo dot de
: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- In this code: #include struct foo { uint16_t a, b; } __attribute__((packed

[Bug tree-optimization/93326] switch optimisation of multiple jumptables into a lookup

2020-01-19 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93326 --- Comment #2 from felix --- Created attachment 47681 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47681&action=edit Optimised into a jumptable, then load of an immediate (-O3 -fno-pic)

[Bug tree-optimization/93326] switch optimisation of multiple jumptables into a lookup

2020-01-19 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93326 --- Comment #1 from felix --- Created attachment 47680 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47680&action=edit Optimised into a lookup table of constants (-O3 -fno-pic)

[Bug tree-optimization/93326] New: switch optimisation of multiple jumptables into a lookup

2020-01-19 Thread felix.von.s at posteo dot de
Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Target: i686-linux-gnu Attached two code samples are equivalent, yet they are

[Bug c/57612] add builtin to assert that expression does not have side effects

2020-01-16 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57612 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #3

[Bug preprocessor/41492] Please ignore #! on the first line of a file

2019-08-10 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41492 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #2

[Bug c/66970] Add __has_builtin() macro

2019-07-13 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 --- Comment #18 from felix --- Proper built-ins are ordinary identifiers subject to ordinary name resolution and shadowing, so the 'keyword built-in' case is impossible. If you don't know if (or don't want to depend on the fact that) a given buil

[Bug c/79775] Confusing fix-it diagnostics with double pointers to structs

2019-06-13 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79775 --- Comment #3 from felix --- A particularly amusing variant of this bug occurs with the following code: struct x { struct x **xx; }; int y = __builtin_offsetof(struct x, xx->xx); which gives the warning $ gcc xx.c xx.c:3:40:

[Bug target/14557] va_list is automatically taken address-of when passed as argument

2018-11-01 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14557 --- Comment #21 from felix --- > va_list ap2; > va_copy(ap2, ap); > and then use &ap2, this always works. > the proposed macros are both broken and unnecessary. That's not equivalent. Using va_arg(ap2, T) does not propagate state changes back

[Bug c/66970] Add __has_builtin() macro

2017-09-16 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #7

[Bug c/82167] Segmentation fault when dereferencing the address of an array argument

2017-09-10 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82167 --- Comment #1 from felix --- Hmm, never mind my question, I found one way to do it... #define NO_SIZEOF_WARNING(expr) ({ \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wsizeof-array-argumen

[Bug c/82167] New: Segmentation fault when dereferencing the address of an array argument

2017-09-10 Thread felix.von.s at posteo dot de
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Host: i686-linux-gnu Target: i686-linux-gnu Created attachment 42145 --> https://gcc.gnu.org/bugzi

[Bug target/14557] va_list is automatically taken address-of when passed as argument

2017-09-10 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14557 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #19

[Bug c/6906] warn about asserts with side effects

2017-07-17 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6906 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #7 from

[Bug c/79816] -Wformat-security should warn about missing or excess precision/width in %s specifiers

2017-03-13 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79816 felix changed: What|Removed |Added See Also|https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=79554

[Bug c/72783] Fortify scanf %s, %[ conversion specifiers

2017-03-07 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72783 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #4

[Bug c/79816] New: -Wformat-security should warn about missing or excess precision/width in %s specifiers

2017-03-02 Thread felix.von.s at posteo dot de
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Created attachment 40869 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40869&action=edit Sample sour

[Bug c/79775] New: Confusing fix-it diagnostics with double pointers to structs

2017-03-01 Thread felix.von.s at posteo dot de
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Created attachment 40859 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40859&action=edit test.c Attempting to compile the a

[Bug target/71286] 6.1.0: compiling djgpp programs with LTO emits "visibility attribute not supported in this configuration" warnings

2016-05-27 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71286 --- Comment #2 from felix --- mingw seems to do fine without it: on that target TARGET_ASM_ASSEMBLE_VISIBILITY (i.e. i386_pe_assemble_visibility) never emits any assembly code, and it only emits a warning if the visibility attribute was specified

[Bug target/71286] New: 6.1.0: compiling djgpp programs with LTO emits "visibility attribute not supported in this configuration" warnings

2016-05-26 Thread felix.von.s at posteo dot de
Version: 6.1.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Host: x86_64-pc-linux-gnu Ta

[Bug driver/68181] New: djgpp: minor linker invocation issues

2015-11-02 Thread felix.von.s at posteo dot de
Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Created attachment 36635 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36635&action=edit gcc/config/i386/djgpp.h patch (5.2.0) 0. The gcc frontend unconditionally in

[Bug target/41557] gcc.exe: Internal error: (null) (program cc1plus)

2015-10-31 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41557 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #4

[Bug target/59672] Add -m16 support for x86

2015-09-29 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59672 felix changed: What|Removed |Added CC||felix.von.s at posteo dot de --- Comment #10

[Bug target/67770] New: i386: -fshrink-wrap can interact badly with trampolines

2015-09-29 Thread felix.von.s at posteo dot de
Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Created attachment 36419 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36419&action=edit Miscompiled program Compiling the a