public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/57883] New: Feature request: better diagnostic for unknown type @ 2013-07-11 21:06 dushistov at mail dot ru 2013-11-09 22:29 ` [Bug c++/57883] " pinskia at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: dushistov at mail dot ru @ 2013-07-11 21:06 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57883 Bug ID: 57883 Summary: Feature request: better diagnostic for unknown type Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dushistov at mail dot ru $cat test.cpp //#include <cstddef> struct vec { double x; double y; double z; double& operator[](size_t i) { switch (i) { case 0: return x; case 1: return y; case 2: return z; } } }; g++ -c -Wall -std=c++11 test.cpp test.cpp:8:21: error: declaration of 'operator[]' as non-function double& operator[](size_t i) { plus more not related errors ... This is completly wrong message, but at the same time clang++ -c -Wall -std=c++11 test.cpp test.cpp:8:21: error: unknown type name 'size_t' double& operator[](size_t i) { ^ 1 error generated. It will be good if gcc also can give error with message that size_t undefined. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/57883] Feature request: better diagnostic for unknown type 2013-07-11 21:06 [Bug c++/57883] New: Feature request: better diagnostic for unknown type dushistov at mail dot ru @ 2013-11-09 22:29 ` pinskia at gcc dot gnu.org 2021-09-28 9:53 ` pinskia at gcc dot gnu.org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2013-11-09 22:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57883 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |NEW Last reconfirmed| |2013-11-09 Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. There might be a dup bug about unknown types giving bad diagnostics. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/57883] Feature request: better diagnostic for unknown type 2013-07-11 21:06 [Bug c++/57883] New: Feature request: better diagnostic for unknown type dushistov at mail dot ru 2013-11-09 22:29 ` [Bug c++/57883] " pinskia at gcc dot gnu.org @ 2021-09-28 9:53 ` pinskia at gcc dot gnu.org 2021-09-28 10:47 ` redi at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-09-28 9:53 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57883 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |11.2.0, 12.0 Known to fail| |11.1.0 CC| |redi at gcc dot gnu.org --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Looks fixed for GCC 11.2.0 and on the trunk. I can't figure out which patch fix it though. we get now: <source>:7:28: error: 'size_t' has not been declared 7 | double& operator[](size_t i) { | ^~~~~~ ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/57883] Feature request: better diagnostic for unknown type 2013-07-11 21:06 [Bug c++/57883] New: Feature request: better diagnostic for unknown type dushistov at mail dot ru 2013-11-09 22:29 ` [Bug c++/57883] " pinskia at gcc dot gnu.org 2021-09-28 9:53 ` pinskia at gcc dot gnu.org @ 2021-09-28 10:47 ` redi at gcc dot gnu.org 2021-09-28 10:48 ` redi at gcc dot gnu.org 2021-09-28 19:12 ` pinskia at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: redi at gcc dot gnu.org @ 2021-09-28 10:47 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57883 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Fixed by r12-1822 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/57883] Feature request: better diagnostic for unknown type 2013-07-11 21:06 [Bug c++/57883] New: Feature request: better diagnostic for unknown type dushistov at mail dot ru ` (2 preceding siblings ...) 2021-09-28 10:47 ` redi at gcc dot gnu.org @ 2021-09-28 10:48 ` redi at gcc dot gnu.org 2021-09-28 19:12 ` pinskia at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: redi at gcc dot gnu.org @ 2021-09-28 10:48 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57883 --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- A test had to be changed due to the new (much better) diagnostic: https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/testsuite/g%2B%2B.dg/parse/saved1.C;h=1deaa93f516894d4757fc8671d630dcbfedaf4f6;hp=979a05676d2069911eb8c47c994ddf2fc4fb4ab8;hb=f9c80eb12c58126a94ad869380af5b88b752c06f;hpb=99585d88a090b4c5b7791f7ab62f70eb37b748fa ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/57883] Feature request: better diagnostic for unknown type 2013-07-11 21:06 [Bug c++/57883] New: Feature request: better diagnostic for unknown type dushistov at mail dot ru ` (3 preceding siblings ...) 2021-09-28 10:48 ` redi at gcc dot gnu.org @ 2021-09-28 19:12 ` pinskia at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-09-28 19:12 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57883 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Target Milestone|--- |11.2 Resolution|--- |FIXED --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Fixed. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-09-28 19:12 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-07-11 21:06 [Bug c++/57883] New: Feature request: better diagnostic for unknown type dushistov at mail dot ru 2013-11-09 22:29 ` [Bug c++/57883] " pinskia at gcc dot gnu.org 2021-09-28 9:53 ` pinskia at gcc dot gnu.org 2021-09-28 10:47 ` redi at gcc dot gnu.org 2021-09-28 10:48 ` redi at gcc dot gnu.org 2021-09-28 19:12 ` pinskia at gcc dot gnu.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).