[Bug c/108310] Some warnings that -Wtraditional-conversion causes to be emitted aren't actually controlled by it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108310 Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2023-08-25 Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |egallager at gcc dot gnu.org --- Comment #6 from Eric Gallager --- I think I might be able to figure this out myself
[Bug c/108310] Some warnings that -Wtraditional-conversion causes to be emitted aren't actually controlled by it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108310 --- Comment #5 from Eric Gallager --- (In reply to Jonathan Wakely from comment #4) > void f(float); > > void g() > { > f(1.0); > } > > conv.c: In function ‘g’: > conv.c:5:5: warning: passing argument 1 of ‘f’ as ‘float’ rather than > ‘double’ due to prototype > 5 | f(1.0); > | ^~~ Thanks, which testsuite subdirectory would this go in?
[Bug c/108310] Some warnings that -Wtraditional-conversion causes to be emitted aren't actually controlled by it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108310 --- Comment #4 from Jonathan Wakely --- void f(float); void g() { f(1.0); } conv.c: In function ‘g’: conv.c:5:5: warning: passing argument 1 of ‘f’ as ‘float’ rather than ‘double’ due to prototype 5 | f(1.0); | ^~~
[Bug c/108310] Some warnings that -Wtraditional-conversion causes to be emitted aren't actually controlled by it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108310 --- Comment #3 from Eric Gallager --- (In reply to Eric Gallager from comment #0) > So, I'm having trouble crafting a testcase that properly reproduces this > issue, but... ...for reference, this is what I've got so far: $ cat Wtraditional_conversion_darwin.c #include #include #include uint32_t foo(float x) { return OSSwapHostToLittleInt32(x); } int32_t bar(double x) { return OSSwapHostToBigInt32(x); } $ Unfortunately, the only warning that it produces so far *is* actually controlled by -Wtraditional-conversion properly, so it's not an example of this bug (yet): $ /usr/local/bin/gcc -c -Wall -Wextra -pedantic -Wtraditional-conversion Wtraditional_conversion_darwin.c In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSByteOrder.h:33, from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/architecture/byte_order.h:38, from Wtraditional_conversion_darwin.c:1: Wtraditional_conversion_darwin.c: In function 'bar': Wtraditional_conversion_darwin.c:12:37: warning: passing argument 1 of '_OSSwapInt32' as integer rather than floating due to prototype [-Wtraditional-conversion] 12 | return OSSwapHostToBigInt32(x); | ^ $ ref: https://github.com/cooljeanius/gcc_bugs/blob/master/Wtraditional_conversion_darwin.c
[Bug c/108310] Some warnings that -Wtraditional-conversion causes to be emitted aren't actually controlled by it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108310 Eric Gallager changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=93082 --- Comment #2 from Eric Gallager --- (In reply to Eric Gallager from comment #1) > Kinda related to bug 103210, IMO, in that I've uncovered both of them by > building my fork of gdb with gcc: > https://github.com/cooljeanius/apple-gdb-1824 More-specific link: https://github.com/cooljeanius/apple-gdb-1824/issues/8 (as the warnings in this bug can be seen preceding the error in question in that bug, which is related to bug 93082)
[Bug c/108310] Some warnings that -Wtraditional-conversion causes to be emitted aren't actually controlled by it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108310 Eric Gallager changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=103210 Blocks||44209 --- Comment #1 from Eric Gallager --- Kinda related to bug 103210, IMO, in that I've uncovered both of them by building my fork of gdb with gcc: https://github.com/cooljeanius/apple-gdb-1824 And, they're also both examples of places where warnings in gcc/c/c-typeck.cc have a "0" for the second argument where they really ought to have an option name instead, as per bug 44209. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44209 [Bug 44209] [meta-bug] Some warnings are not linked to diagnostics options