public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/36708] New: syntatic warning
@ 2008-07-03 1:55 robert dot lore at opensyscon dot com dot au
2008-07-03 2:51 ` [Bug c/36708] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: robert dot lore at opensyscon dot com dot au @ 2008-07-03 1:55 UTC (permalink / raw)
To: gcc-bugs
I think this code is syntactically correct, but can cause problems in
debugging. If you don't scrutinize the code too carefully you can waste time
here - code was a cut and paste from strcpy to integer assignment with
resultant comma not changed to assignment.
// this code does nothing !
f -> font_size, current_font_size;
// this code does something
f -> font_size= current_font_size;
should this produce a warning like "statement does nothing" ? its like an
unused variable warning, it is a courtesy thing..
--
Summary: syntatic warning
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: robert dot lore at opensyscon dot com dot au
GCC build triplet: same
GCC host triplet: x86 linux (redhat) gcc
GCC target triplet: same
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36708
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/36708] syntatic warning
2008-07-03 1:55 [Bug c/36708] New: syntatic warning robert dot lore at opensyscon dot com dot au
@ 2008-07-03 2:51 ` pinskia at gcc dot gnu dot org
2008-07-21 16:17 ` manu at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-03 2:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-07-03 02:50 -------
-Wunused-value should warn about this ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36708
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/36708] syntatic warning
2008-07-03 1:55 [Bug c/36708] New: syntatic warning robert dot lore at opensyscon dot com dot au
2008-07-03 2:51 ` [Bug c/36708] " pinskia at gcc dot gnu dot org
@ 2008-07-21 16:17 ` manu at gcc dot gnu dot org
2008-07-22 5:57 ` robert dot lore at opensyscon dot com dot au
2008-07-22 7:21 ` manu at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-07-21 16:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from manu at gcc dot gnu dot org 2008-07-21 16:16 -------
We need a complete testcase. I tried to reproduce this but GCC 4.4 with -Wall
-Wextra -Wunused always says:
src/pr36708.c:5: warning: left-hand operand of comma expression has no effect
src/pr36708.c:5: warning: statement with no effect
So this may be already fixed or your testcase is special. What flags are you
using?
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36708
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/36708] syntatic warning
2008-07-03 1:55 [Bug c/36708] New: syntatic warning robert dot lore at opensyscon dot com dot au
2008-07-03 2:51 ` [Bug c/36708] " pinskia at gcc dot gnu dot org
2008-07-21 16:17 ` manu at gcc dot gnu dot org
@ 2008-07-22 5:57 ` robert dot lore at opensyscon dot com dot au
2008-07-22 7:21 ` manu at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: robert dot lore at opensyscon dot com dot au @ 2008-07-22 5:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from robert dot lore at opensyscon dot com dot au 2008-07-22 05:56 -------
Subject: RE: syntatic warning
I did not have the flags you nominated set.
Thanks for you assistance
Robert
-----Original Message-----
From: manu at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org]
Sent: Tuesday, 22 July 2008 2:17 AM
To: robert.lore@opensyscon.com.au
Subject: [Bug c/36708] syntatic warning
------- Comment #2 from manu at gcc dot gnu dot org 2008-07-21 16:16
-------
We need a complete testcase. I tried to reproduce this but GCC 4.4 with
-Wall
-Wextra -Wunused always says:
src/pr36708.c:5: warning: left-hand operand of comma expression has no
effect
src/pr36708.c:5: warning: statement with no effect
So this may be already fixed or your testcase is special. What flags are you
using?
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36708
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36708
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/36708] syntatic warning
2008-07-03 1:55 [Bug c/36708] New: syntatic warning robert dot lore at opensyscon dot com dot au
` (2 preceding siblings ...)
2008-07-22 5:57 ` robert dot lore at opensyscon dot com dot au
@ 2008-07-22 7:21 ` manu at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-07-22 7:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from manu at gcc dot gnu dot org 2008-07-22 07:20 -------
Closing as invalid then.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36708
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-22 7:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-03 1:55 [Bug c/36708] New: syntatic warning robert dot lore at opensyscon dot com dot au
2008-07-03 2:51 ` [Bug c/36708] " pinskia at gcc dot gnu dot org
2008-07-21 16:17 ` manu at gcc dot gnu dot org
2008-07-22 5:57 ` robert dot lore at opensyscon dot com dot au
2008-07-22 7:21 ` 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).