Hi again, hi Jason,
I can't help further investigating this issue and I have a completely
different proposal which pursues a different hint of Jason: why the
TREE_TYPE of such DECL is error_mark_node in the first place? As we
understand now that is just something that start_decl_1 does when it
.. if I disregard that comment, the incomplete type B gets through,
gets to check_initializer (which is involved anyway even if there is no
initializer in this case for b1) and somewhat comically gets to:
else if (!COMPLETE_TYPE_P (type))
{
error_at (DECL_SOURCE_LOCATION (decl),
. in particular there is this comment in start_decl_1, where the type
becomes error_mark_node:
5102 if (type_uses_auto (type))
5103 error ("declaration of %q#D has no initializer", decl);
5104 else
5105 error ("aggregate %q#D has incomplete type and cannot be
defined
.. the type of b1 becomes error_mark_node at the end of start_decl as
an effect of start_decl_1 (which issues the incomplete type error).
Paolo.
Hi,
On 10/06/2016 22:08, Jason Merrill wrote:
On Thu, Jun 9, 2016 at 9:43 PM, Paolo Carlini wrote:
... and this version passes testing. For real.
This seems reasonable, but I still wonder why b1 has error_mark_node
type, since it has no initializer at all.
Well, we are now pondering very basi
On Thu, Jun 9, 2016 at 9:43 PM, Paolo Carlini wrote:
> ... and this version passes testing. For real.
This seems reasonable, but I still wonder why b1 has error_mark_node
type, since it has no initializer at all.
Jason
... and this version passes testing. For real.
Paolo.
Index: cp/decl.c
===
--- cp/decl.c (revision 237285)
+++ cp/decl.c (working copy)
@@ -6002,6 +6002,13 @@ check_initializer (tree decl, tree init,
Hi,
On 09/06/2016 23:38, Jason Merrill wrote:
I would think that when we see a duplicated base we should just drop
the duplicates and continue.
If the type of b1 is error_mark_node, why isn't the type of b2 also
error_mark_node?
Thanks Jason. Normally check_initializer massages the decl basing
I would think that when we see a duplicated base we should just drop
the duplicates and continue.
If the type of b1 is error_mark_node, why isn't the type of b2 also
error_mark_node?
Jason
On Thu, Jun 9, 2016 at 1:01 PM, Paolo Carlini wrote:
> Hi again,
>
> thus today I had to revert my first
On Thu, Jun 09, 2016 at 07:01:47PM +0200, Paolo Carlini wrote:
> Now the first comment I have about this, about which I'd like to have some
> feedback, is that the gcc_unreachable () at the end of
> build_simple_base_path without a return seems a bit weird to me, because the
> function is *supposed
Hi again,
thus today I had to revert my first try at resolving this error recovery
issue because it caused c++/71465. In retrospect it was a bit heavy
handed anyway, the zeroing of the type served us well for many years...
Today I tried to investigate the issue a bit more. I remind you that w
11 matches
Mail list logo