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

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).