[Bug middle-end/60488] missing uninitialized warning (address taken, VOP)

2021-03-27 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60488 --- Comment #7 from Manuel López-Ibáñez --- (In reply to Martin Sebor from comment #6) > The problem is that when the address of a variable escapes, because GCC > doesn't track when, when the function from which it escapes calls another > that mi

[Bug middle-end/57832] compiling sha-256 code (xz 5.0.5) generates false warnings when using -march=native on Atom CPU

2021-03-27 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57832 --- Comment #5 from Manuel López-Ibáñez --- Either there is no bug or the reduction is incorrect because the warning in the testcase is correct since d is uninitialized. Maybe the bug is that it warns about 'c' and not about 'd', but probably at

[Bug middle-end/57832] compiling sha-256 code (xz 5.0.5) generates false warnings when using -march=native on Atom CPU

2021-03-28 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57832 --- Comment #7 from Manuel López-Ibáñez --- (In reply to Martin Sebor from comment #6) > In the reduced test cases (in comment #3 and comment #4) d is a global > variable so it's value is zero. c is assigned in the first iteration of the > loop

[Bug middle-end/60488] missing uninitialized warning (address taken, VOP)

2021-03-30 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60488 --- Comment #9 from Manuel López-Ibáñez --- (In reply to Martin Sebor from comment #8) > You're right, the test cases aren't equivalent, or meant to be. What I want > to highlight is that in the test case in comment #6, in g() and other > simila

[Bug middle-end/61112] Simple example triggers false-positive -Wmaybe-uninitialized warning

2021-03-30 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61112 --- Comment #9 from Manuel López-Ibáñez --- (In reply to Martin Sebor from comment #8) > I've added both the passing test case from comment #0 and the still failing > test case from comment #5 to the test suite and xfailed the latter (thus > reco

[Bug middle-end/63943] wrong location for -Wmaybe-uninitialized in inlined function

2021-03-31 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63943 --- Comment #4 from Manuel López-Ibáñez --- (In reply to Martin Sebor from comment #3) > As for using %K, I mostly agree. I actually have %G in my tree, but my goal > is to get rid of both and replace them with a new warning function like so: >

[Bug c++/18635] [DR 504] use of uninitialised reference accepted (without -Wuninitialized) in C++ front end

2021-04-08 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18635 Manuel López-Ibáñez changed: What|Removed |Added URL||http://www.open-std.org/jtc

[Bug middle-end/95848] missing -Wuninitialized passing structs by value (VOPS)

2021-01-20 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95848 --- Comment #3 from Manuel López-Ibáñez --- Martin, it is not clear from the dumps what is the difference between the two cases. Also, this warning triggers even with -O0, so it must come pretty earlier even before we have VOPS. What is the diffe

[Bug driver/69471] "-march=native" unintentionally breaks further -march/-mtune flags

2021-06-01 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69471 --- Comment #18 from Manuel López-Ibáñez --- (In reply to wavexx from comment #17) > I wish this would be given a nudge, considering the patch. This has been > pushed to new releases since 2016 :( I see several patches have been committed alread

[Bug c/47781] warnings from custom printf format specifiers

2023-01-18 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47781 --- Comment #28 from Manuel López-Ibáñez --- (In reply to Jan Wielemaker from comment #27) > It is really a pity this can't be resolved :( We have quite a few > extensions in the SWI-Prolog source code, mostly for debug messages that > deal with

[Bug c/47781] warnings from custom printf format specifiers

2023-01-18 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47781 --- Comment #30 from Manuel López-Ibáñez --- (In reply to jos...@codesourcery.com from comment #29) > As I said before, the issue is still how to define something general > enough to be useful but that doesn't expose too much of the details of

[Bug c/63357] Warn for P && P and P || P (same expression used multiple times in a condition)

2023-02-24 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63357 --- Comment #9 from Manuel López-Ibáñez --- (In reply to David Binderman from comment #8) > This could probably be extended to other operators. Please open a new PR mentioning this one.

[Bug c/109123] New: Bogus warning: pointer used after 'realloc' -Wuse-after-free

2023-03-14 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109123 Bug ID: 109123 Summary: Bogus warning: pointer used after 'realloc' -Wuse-after-free Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal

[Bug c/109123] Bogus warning: pointer used after 'realloc' -Wuse-after-free with -O2

2023-03-14 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109123 Manuel López-Ibáñez changed: What|Removed |Added Summary|Bogus warning: pointer used |Bogus warning: pointer used

[Bug c/109123] Bogus warning: pointer used after 'realloc' -Wuse-after-free with -O2

2023-03-14 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109123 --- Comment #2 from Manuel López-Ibáñez --- This is probably the same underlying issue as PR 106119 and PR 104215, but unlike those, this testcase is heavily reduced without any header files (and it could be reduced further I believe).

[Bug c/109123] Bogus warning: pointer used after 'realloc' -Wuse-after-free with -O2

2023-03-14 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109123 --- Comment #4 from Manuel López-Ibáñez --- This case is a bit different from other Wuse-after-free false positives: * there is no path through which the warning is true * the warning says "is used" not "may be used" * there is no easy workarou

[Bug c/109123] Bogus warning: pointer used after 'realloc' -Wuse-after-free with -O2

2023-03-14 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109123 --- Comment #5 from Manuel López-Ibáñez --- > GCC has sunk part of the old_size computation (not the loads but the > subtraction) to after the realloc but before the use of old_size. Is this code motion valid? Is there any point in the middle-e

[Bug c/109123] Bogus warning: pointer used after 'realloc' -Wuse-after-free with -O2

2023-03-14 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109123 --- Comment #6 from Manuel López-Ibáñez --- (In reply to Manuel López-Ibáñez from comment #5) > Is this code motion valid? Is there any point in the middle-end that checks > the validity of the pointer beyond a free/realloc? > > If there is a p

[Bug c/109123] Bogus warning: pointer used after 'realloc' -Wuse-after-free with -O2

2023-03-14 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109123 --- Comment #8 from Manuel López-Ibáñez --- (In reply to Richard Biener from comment #7) > Warning for "escapes" (the store is an escape point) is also sensible I > think. Would it be possible to make this distinction at the point of warning?

[Bug c/50486] No warning at signed -> unsigned casting

2022-04-11 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50486 --- Comment #3 from Manuel López-Ibáñez --- Clang warns: :16:18: warning: implicit conversion changes signedness: 'int' to 'enum e' [-Wsign-conversion] return a(-1); ~ ^~ Not sure why gcc doesn't but it should.

[Bug other/42540] c++ error message [vtable undefined] is unhelpful

2022-08-25 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42540 Manuel López-Ibáñez changed: What|Removed |Added Assignee|jyasskin at gmail dot com |unassigned at gcc dot gnu.o

[Bug other/42540] c++ error message [vtable undefined] is unhelpful

2022-08-25 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42540 --- Comment #24 from Manuel López-Ibáñez --- For completeness, this is what LLD says: ld.lld: error: undefined symbol: vtable for A >>> referenced by example.cpp:7 >>> /tmp/example-5d8b98.o:(A::A()) >>> the vtable symbol may be und

[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

2021-12-19 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431 --- Comment #46 from Manuel López-Ibáñez --- (In reply to Lewis Hyatt from comment #44) > I hope this looks workable, happy to adjust the patch as needed. If you don't get much attention to the patch, it may be worth pinging it. But before that,

[Bug fortran/58334] preprocessor behavior diffs under line continuation

2021-08-27 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58334 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Commen

[Bug fortran/62226] Encode CPP options in lang.opt

2021-09-25 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62226 --- Comment #2 from Manuel López-Ibáñez --- (In reply to Tobias Burnus from comment #1) > I am not sure whether the original issue still exists. > > Fortran now uses a lot of the common machinery and also seems to handle > CPP() well. > > Thus,

[Bug fortran/102484] New: Refactor duplicated cb_cpp_diagnostic_cpp_option

2021-09-25 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102484 Bug ID: 102484 Summary: Refactor duplicated cb_cpp_diagnostic_cpp_option Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Compone

[Bug fortran/56659] Segfault due to missing libcpp error handler for "gfortran -cpp"

2021-10-08 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56659 --- Comment #9 from Manuel López-Ibáñez --- (In reply to Tobias Burnus from comment #8) > f951: Warning: Include directory ‘foo/bar/’: Permission denied > : Error: foo/bar: Permission denied > > (The shows up when entering a file but the fi

[Bug c++/67499] c++ template/overload diagnostic compression

2021-08-23 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67499 --- Comment #10 from Manuel López-Ibáñez --- This is the current GCC output: ``` : In function 'int main()': :5:13: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream'} and 'foo') 5 | std::cout << b

[Bug c++/67499] c++ template/overload diagnostic compression

2021-08-23 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67499 --- Comment #11 from Manuel López-Ibáñez --- And Clang output: :5:13: error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream') and 'foo') std::cout << bar; ~ ^ ~~~ /opt/compiler-explorer/gcc-snapshot/lib/gc

[Bug c/39589] make -Wmissing-field-initializers=2 work with "designated initializers" ?

2023-08-24 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39589 Manuel López-Ibáñez changed: What|Removed |Added Keywords||patch --- Comment #15 from Manuel

[Bug c/111654] Introduce clang's invalid-noreturn warning

2023-10-02 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111654 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Comme

[Bug c/111654] Introduce clang's invalid-noreturn warning

2023-10-02 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111654 --- Comment #4 from Manuel López-Ibáñez --- (In reply to Julian Waters from comment #2) > (In reply to Manuel López-Ibáñez from comment #1) > Yeah, I did try submitting it to gcc-patches, but it simply went ignored for > forever, so I decided to

[Bug other/44209] [meta-bug] Some warnings are not linked to diagnostics options

2023-10-02 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44209 --- Comment #9 from Manuel López-Ibáñez --- For the sake of other potential readers: Patches should be submitted to gcc-patc...@gcc.gnu.org and reviewers do not review patches in bugzilla. Nevertheless, it is a good idea to add the link to the ma

[Bug tree-optimization/114952] False positive -Wmaybe-uninitialized starting at -O3 in libbpf

2024-06-08 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114952 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Comme

[Bug c/28492] -Wmissing-format-attribute points to vsnprintf() or related functions instead of the function that needs the attribute added

2024-01-09 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28492 Manuel López-Ibáñez changed: What|Removed |Added Last reconfirmed|2012-04-17 00:00:00 |2024-1-9 --- Comment #6 from Manue

[Bug c/70730] Inconsistent column number in "error: attempt to take address of bit-field structure member"

2024-01-25 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70730 --- Comment #3 from Manuel López-Ibáñez --- (In reply to Eric Gallager from comment #2) > (In reply to Manuel López-Ibáñez from comment #1) > > If not, this then depends on PR43486 > > (that's now fixed, btw... so maybe that's had an impact on t

[Bug tree-optimization/118004] missing -Wuninitialized for printf

2024-12-12 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118004 Manuel López-Ibáñez changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug tree-optimization/118004] missing -Wuninitialized for printf

2024-12-12 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118004 --- Comment #4 from Manuel López-Ibáñez --- (In reply to Xi Ruoyao from comment #3) > Making the entire ... access (read_only) would be incorrect, considering the > argument corresponding to %n should be access (write_only) instead. > > So we s

[Bug lto/114218] If there is an ODR violation due to array sizes being different, it would be useful to show what the sizes were

2025-03-24 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114218 Manuel López-Ibáñez changed: What|Removed |Added Keywords||easyhack CC|

[Bug lto/114218] If there is an ODR violation due to array sizes being different, it would be useful to show what the sizes were

2025-03-24 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114218 --- Comment #5 from Manuel López-Ibáñez --- (In reply to Sam James from comment #4) > Thank you! I will have a go. If there are already tests available in the testsuite that test for this output, just update the output. You do not need to add a

[Bug driver/91406] gcc -Q -v --help=optimizers lies about what flags are enabled

2025-04-30 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91406 Manuel López-Ibáñez changed: What|Removed |Added Summary|gcc -Q -v lies about what |gcc -Q -v --help=optimizers

[Bug driver/119823] -Q --help=optimizers output is misleading for -O0 + inconsistent docs in the manual

2025-04-30 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119823 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Comme

[Bug c++/66943] GCC warns of Unknown Pragma for OpenMP, even though it support it.

2025-03-01 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66943 --- Comment #11 from Manuel López-Ibáñez --- I think having -Wignored-pragma-omp would be useful: 1. It is useful to have a warning that warns that you need to use -fopenmp for #pragma omp to have an effect. 2. However, it is very common to wan

[Bug tree-optimization/120135] Strange -Wuninitialized behavior with struct

2025-05-07 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120135 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Comme

[Bug c/92826] Impossible to silence warning: non-standard suffix on floating constant [-Wpedantic]

2025-05-27 Thread manu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92826 Manuel López-Ibáñez changed: What|Removed |Added CC||jsm28 at gcc dot gnu.org,