public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/24016] Missing warning for unspecified evaluation order
[not found] <bug-24016-4@http.gcc.gnu.org/bugzilla/>
@ 2015-05-23 6:09 ` miyuki at gcc dot gnu.org
2015-05-23 13:45 ` mpolacek at gcc dot gnu.org
2021-12-31 1:58 ` egallager at gcc dot gnu.org
2 siblings, 0 replies; 5+ messages in thread
From: miyuki at gcc dot gnu.org @ 2015-05-23 6:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24016
Mikhail Maltsev <miyuki at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |miyuki at gcc dot gnu.org
--- Comment #3 from Mikhail Maltsev <miyuki at gcc dot gnu.org> ---
It seems to me that __extension__ also inhibits some other useful warnings. For
example:
#include <string.h>
int foo(void *x) {
return strcmp(x + 1, "test");
}
does not cause warnings when compiled with -Wpointer-arith -O1 (glibc v. 2.17).
It can be reduced to:
int foo(void *x) {
return __extension__({ __builtin_strcmp(x + 1, "test"); });
}
Note, that we do warn about
int foo(void *x) {
return ({ __builtin_strcmp(x + 1, "test"); });
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/24016] Missing warning for unspecified evaluation order
[not found] <bug-24016-4@http.gcc.gnu.org/bugzilla/>
2015-05-23 6:09 ` [Bug c/24016] Missing warning for unspecified evaluation order miyuki at gcc dot gnu.org
@ 2015-05-23 13:45 ` mpolacek at gcc dot gnu.org
2021-12-31 1:58 ` egallager at gcc dot gnu.org
2 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-05-23 13:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24016
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Since arithmetic on void * (treating sizeof(void) as 1) is a GNU extension,
that behavior is desirable.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/24016] Missing warning for unspecified evaluation order
[not found] <bug-24016-4@http.gcc.gnu.org/bugzilla/>
2015-05-23 6:09 ` [Bug c/24016] Missing warning for unspecified evaluation order miyuki at gcc dot gnu.org
2015-05-23 13:45 ` mpolacek at gcc dot gnu.org
@ 2021-12-31 1:58 ` egallager at gcc dot gnu.org
2 siblings, 0 replies; 5+ messages in thread
From: egallager at gcc dot gnu.org @ 2021-12-31 1:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24016
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #2)
> (In reply to comment #1)
> >
> > It is, however, at least unspecified order of evaluation and a warning
> > here would still make sense.
> >
>
> A candidate for -Wsequence-points ?
...or a new flag?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/24016] Missing warning for unspecified evaluation order
[not found] <bug-24016-6528@http.gcc.gnu.org/bugzilla/>
2005-11-26 7:50 ` gdr at gcc dot gnu dot org
@ 2007-03-12 17:48 ` manu at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-03-12 17:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from manu at gcc dot gnu dot org 2007-03-12 17:48 -------
(In reply to comment #1)
>
> It is, however, at least unspecified order of evaluation and a warning
> here would still make sense.
>
A candidate for -Wsequence-points ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24016
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/24016] Missing warning for unspecified evaluation order
[not found] <bug-24016-6528@http.gcc.gnu.org/bugzilla/>
@ 2005-11-26 7:50 ` gdr at gcc dot gnu dot org
2007-03-12 17:48 ` manu at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-11-26 7:50 UTC (permalink / raw)
To: gcc-bugs
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-11-26 07:50:22
date| |
Summary|Missing "operation on xxx |Missing warning for
|may be undefined" on obvious|unspecified evaluation order
|undefined code |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24016
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-31 1:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-24016-4@http.gcc.gnu.org/bugzilla/>
2015-05-23 6:09 ` [Bug c/24016] Missing warning for unspecified evaluation order miyuki at gcc dot gnu.org
2015-05-23 13:45 ` mpolacek at gcc dot gnu.org
2021-12-31 1:58 ` egallager at gcc dot gnu.org
[not found] <bug-24016-6528@http.gcc.gnu.org/bugzilla/>
2005-11-26 7:50 ` gdr at gcc dot gnu dot org
2007-03-12 17:48 ` manu at gcc dot gnu dot 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).