| Subject: | [Bug c/37947] missing sequence point warning for 'count += inc(&count);' |
|---|---|
| From: | "manu at gcc dot gnu dot org" |
| Date: | 29 Oct 2008 15:46:43 -0000 |
------- Comment #7 from manu at gcc dot gnu dot org 2008-10-29 15:46 -------
(In reply to comment #6)
> Warning is (reliably) only possible if we can tell if the function call
> modifies
> the passed storage. This requires some IPA analysis and thus moving the
> warning to the middle-end.
I don't want that at all. I wonder how much correct code is written like this
against how much incorrect code. However, now I realize that any function call
counter += inc();
can trigger this if counter is a global variable. So this is impossible to get
right 100% and it is not probably practical to move to the middle-end, since it
is very front-end specific.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37947
|
| Previous by Date: | [Bug middle-end/37339] [4.4 Regression] gcc.dg/pr33645-3.c scan-assembler-not var1_t, jakub at gcc dot gnu dot org |
|---|---|
| Next by Date: | [Bug c++/26997] g++ reports misleading error message when the identifier with error occurs earlier on the same line, manu at gcc dot gnu dot org |
| Previous by Thread: | [Bug c/37947] missing sequence point warning for 'count += inc(&count);', rguenth at gcc dot gnu dot org |
| Next by Thread: | [Bug rtl-optimization/37948] New: [4.4 Regression] IRA generates slower code for -mtune=core2, hjl dot tools at gmail dot com |
| Indexes: | [Date] [Thread] [Top] [All Lists] |