https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
Jonathan Wakely changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
--- Comment #14 from Jonathan Wakely ---
Author: redi
Date: Mon Dec 17 21:49:58 2018
New Revision: 267219
URL: https://gcc.gnu.org/viewcvs?rev=267219&root=gcc&view=rev
Log:
PR c++/52321 print note for static_cast to/from incomplete type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
--- Comment #12 from Jonathan Wakely ---
(In reply to Ivan Godard from comment #4)
> Define an enum of reasons with "success" first, flop the sense of the test
> so that false means coercion was OK (grep to find all calls and put a "!" in
> front
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
Jonathan Wakely changed:
What|Removed |Added
Keywords||patch
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
--- Comment #10 from Jonathan Wakely ---
Untested patch:
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -7348,8 +7348,19 @@ build_static_cast (tree type, tree oexpr, tsubst_flags_t
complain)
}
if (complain & tf_error)
-error ("inval
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
--- Comment #9 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #8)
> Clang outputs an extra line saying the type is incomplete (which should
> probably be a "note:" but nevermind):
Ha, it is a note, but on my terminal the "not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
Jonathan Wakely changed:
What|Removed |Added
CC||petschy at gmail dot com
--- Comment #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
Jonathan Wakely changed:
What|Removed |Added
CC||chengniansun at gmail dot com
--- Comm
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
Manuel López-Ibáñez changed:
What|Removed |Added
CC||manu at gcc dot gnu.org
--- Comment
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
--- Comment #4 from Ivan Godard 2012-02-21
17:38:30 UTC ---
Define an enum of reasons with "success" first, flop the sense of the test so
that false means coercion was OK (grep to find all calls and put a "!" in front
of each), and return the rea
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
--- Comment #3 from Jonathan Wakely 2012-02-21
15:53:10 UTC ---
Yep, it's build_static_cast_1 in typeck.c
But currently that has no way to store or pass back a message (just a boolean
indicating success or failure and the result of the cast) and
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
--- Comment #2 from Ivan Godard 2012-02-21
15:30:42 UTC ---
Somewhere there's an attept to coerce a to b that sees the source is a class
and the target is a class and tries to see if the source is derived from
target. That check fails because sou
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52321
Jonathan Wakely changed:
What|Removed |Added
Keywords||diagnostic
Severity|normal
14 matches
Mail list logo