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
* [Bug c++/31158] wrong line number in warning: overflow in implicit constant conversion 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 ` 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 2 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu dot org @ 2007-03-13 10:24 UTC (permalink / raw) To: gcc-bugs -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Keywords| |diagnostic http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31158 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/31158] wrong line number in warning: overflow in implicit constant conversion 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 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2007-07-06 0:47 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from pinskia at gcc dot gnu dot org 2007-07-06 00:47 ------- The issue is the conversion is done at the end of parsing the whole statement. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31158 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/31158] wrong line number in warning: overflow in implicit constant conversion 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 2 siblings, 0 replies; 4+ messages in thread From: manu at gcc dot gnu dot org @ 2010-02-20 18:36 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from manu at gcc dot gnu dot org 2010-02-20 18:35 ------- This is confirmed in C and C++. The front-ends need location information everywhere. Any help is appreciated. -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-02-20 18:35:53 date| | 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).