public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31158]  New: wrong line number in warning: overflow in implicit constant conversion
@ 2007-03-13  0:19 sebor at roguewave dot com
  2007-03-13 10:24 ` [Bug c++/31158] " rguenth at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sebor at roguewave dot com @ 2007-03-13  0:19 UTC (permalink / raw)
  To: gcc-bugs

The line number in the warning below points to the closing brace of the
initializer expression making it difficult to find the offending line if the
initializer is many lines long. I would like to suggest that the line number be
that of the problem line (and perhaps include the column number as well, if
possible, when there is more than one initializer per line).

$ cat t.cpp && g++ -Wall t.cpp
/*   1 */ int main ()
/*   2 */ {
/*   3 */     const struct { short i; } a[] = {
/*   4 */         { 65535U },
/*   5 */         { 65536U }
/*   6 */     };
/*   7 */     (void)&a;
/*   8 */ }
/*   9 */ 
t.cpp: In function 'int main()':
t.cpp:6: warning: overflow in implicit constant conversion


-- 
           Summary: wrong line number in warning: overflow in implicit
                    constant conversion
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31158


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-20 18:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-13  0:19 [Bug c++/31158] New: wrong line number in warning: overflow in implicit constant conversion sebor at roguewave dot com
2007-03-13 10:24 ` [Bug c++/31158] " rguenth at gcc dot gnu dot org
2007-07-06  0:47 ` pinskia at gcc dot gnu dot org
2010-02-20 18:36 ` 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).