public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/109827] New: Pointer/integer mismatch in ?: not covered by -Wint-conversion
@ 2023-05-12 11:15 fw at gcc dot gnu.org
2023-05-30 10:51 ` [Bug c/109827] " egallager at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: fw at gcc dot gnu.org @ 2023-05-12 11:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109827
Bug ID: 109827
Summary: Pointer/integer mismatch in ?: not covered by
-Wint-conversion
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: fw at gcc dot gnu.org
Target Milestone: ---
This:
int p;
long *q;
void *
f1 (int x)
{
return x ? p : q;
}
void *
f2 (int x)
{
return x ? q : p;
}
warns as (twice):
warning: pointer/integer type mismatch in conditional expression
So it does not error with -Werror=int-conversion, which I think is unexpected.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/109827] Pointer/integer mismatch in ?: not covered by -Wint-conversion
2023-05-12 11:15 [Bug c/109827] New: Pointer/integer mismatch in ?: not covered by -Wint-conversion fw at gcc dot gnu.org
@ 2023-05-30 10:51 ` egallager at gcc dot gnu.org
2023-10-20 7:56 ` fw at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: egallager at gcc dot gnu.org @ 2023-05-30 10:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109827
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-05-30
Status|UNCONFIRMED |NEW
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
Blocks| |44209
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
Confirmed.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44209
[Bug 44209] [meta-bug] Some warnings are not linked to diagnostics options
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/109827] Pointer/integer mismatch in ?: not covered by -Wint-conversion
2023-05-12 11:15 [Bug c/109827] New: Pointer/integer mismatch in ?: not covered by -Wint-conversion fw at gcc dot gnu.org
2023-05-30 10:51 ` [Bug c/109827] " egallager at gcc dot gnu.org
@ 2023-10-20 7:56 ` fw at gcc dot gnu.org
2023-10-20 20:16 ` cvs-commit at gcc dot gnu.org
2023-10-20 20:20 ` fw at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: fw at gcc dot gnu.org @ 2023-10-20 7:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109827
Florian Weimer <fw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |fw at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from Florian Weimer <fw at gcc dot gnu.org> ---
Patch posted:
https://inbox.sourceware.org/gcc-patches/87y1fxzszn.fsf@oldenburg.str.redhat.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/109827] Pointer/integer mismatch in ?: not covered by -Wint-conversion
2023-05-12 11:15 [Bug c/109827] New: Pointer/integer mismatch in ?: not covered by -Wint-conversion fw at gcc dot gnu.org
2023-05-30 10:51 ` [Bug c/109827] " egallager at gcc dot gnu.org
2023-10-20 7:56 ` fw at gcc dot gnu.org
@ 2023-10-20 20:16 ` cvs-commit at gcc dot gnu.org
2023-10-20 20:20 ` fw at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-20 20:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109827
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Florian Weimer <fw@gcc.gnu.org>:
https://gcc.gnu.org/g:7069ea909f5292a17d22e5e68218373186820d29
commit r14-4805-g7069ea909f5292a17d22e5e68218373186820d29
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Oct 20 21:27:52 2023 +0200
c: -Wint-conversion should cover pointer/integer mismatches in ?:
gcc/c/
PR c/109827
PR other/44209
* c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
for pointer/integer mismatch warnings.
gcc/testsuite/
* gcc.dg/Wint-conversion-3.c: New.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/109827] Pointer/integer mismatch in ?: not covered by -Wint-conversion
2023-05-12 11:15 [Bug c/109827] New: Pointer/integer mismatch in ?: not covered by -Wint-conversion fw at gcc dot gnu.org
` (2 preceding siblings ...)
2023-10-20 20:16 ` cvs-commit at gcc dot gnu.org
@ 2023-10-20 20:20 ` fw at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: fw at gcc dot gnu.org @ 2023-10-20 20:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109827
Florian Weimer <fw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Florian Weimer <fw at gcc dot gnu.org> ---
Fixed for GCC 14.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-20 20:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-12 11:15 [Bug c/109827] New: Pointer/integer mismatch in ?: not covered by -Wint-conversion fw at gcc dot gnu.org
2023-05-30 10:51 ` [Bug c/109827] " egallager at gcc dot gnu.org
2023-10-20 7:56 ` fw at gcc dot gnu.org
2023-10-20 20:16 ` cvs-commit at gcc dot gnu.org
2023-10-20 20:20 ` fw at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).