public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Giovanni Bajo" <giovannibajo@libero.it>
To: "Gabriel Dos Reis" <gdr@integrable-solutions.net>
Cc: <gcc-patches@gcc.gnu.org>, "Jason Merrill" <jason@redhat.com>,
	"Mark Mitchell" <mark@codesourcery.com>
Subject: Re: Unreviewed C++ patch
Date: Tue, 08 Jun 2004 05:50:00 -0000	[thread overview]
Message-ID: <208301c44cfe$58725ab0$444e2a97@bagio> (raw)
In-Reply-To: <m34qppjpys.fsf@uniton.integrable-solutions.net>

Gabriel Dos Reis wrote:

>> [PR7841] Fix invalid name of constructor
>> http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01197.html
>
> Since you detect the problem and know about what is going on, the
> error message
>
>   error: invalid use of argument list for a constructor in a
> qualified name
>
> is a bit unclear.  What about
>
>   error: invalid use of constructor 'X<dim>::X' as a template
>
> ?

Sure, but I kept the inform() so I don't name the expression in the diagnostic.
I'm committing this (given also Mark's approval):

      error ("invalid use of constructor as a template");
      inform ("use `%T::%D' instead of `%T::%T' to name the "
       "constructor in a qualified name", class_type,
       DECL_NAME (TYPE_TI_TEMPLATE (class_type)),
       class_type, class_type);

> We should also reject the follwoing
>
>     X<dim>::X<dim>  x;
>
> and
>
>    struct A { };
>    A::A a;

This is different though. I filed PR 15865 to track this.

Giovanni Bajo


  reply	other threads:[~2004-06-08  2:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-06  3:59 Giovanni Bajo
2004-06-06  7:48 ` Gabriel Dos Reis
2004-06-08  5:50   ` Giovanni Bajo [this message]
2004-06-09  7:58     ` Gabriel Dos Reis
2004-06-07 16:48 ` Mark Mitchell
  -- strict thread matches above, loose matches on Subject: below --
2004-02-09  4:56 Giovanni Bajo
2004-02-21 13:45 ` Giovanni Bajo
2004-01-30 10:48 Giovanni Bajo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='208301c44cfe$58725ab0$444e2a97@bagio' \
    --to=giovannibajo@libero.it \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdr@integrable-solutions.net \
    --cc=jason@redhat.com \
    --cc=mark@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).