public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mark Mitchell <mmitchell@usa.net>
To: oliva@dcc.unicamp.br
Cc: jbuck@synopsys.com, als@tusc.com.au, egcs@cygnus.com
Subject: Re: error message formatting
Date: Thu, 16 Apr 1998 23:59:00 -0000	[thread overview]
Message-ID: <199804162313.QAA29122@mail.earthlink.net> (raw)
In-Reply-To: <orwwcp8r1d.fsf@narizinho.lsd.dcc.unicamp.br>

>>>>> "Alexandre" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:

    Alexandre> Mark Mitchell writes:

    >> We have to be careful that we don't introduce ambiguity in the
    >> process.  It may be possible to do so by dropping defaulted
    >> arguments,

    >> template <class T, class U = T**> void f();

    >> template <class T*, class U = T*> void f();

    Alexandre> `classs T*' is not a valid template argument
    Alexandre> declaration.

Thank you for the improved example.  I *knew* when I wrote what I did
that I didn't have it right, but I didn't have time to think about it
carefully.  What an embarrassing mistake!

    Alexandre> However, the raised issue is a valid one.  Suppose one
    Alexandre> declares:

    Alexandre> template <typename T, int i = 1> void f(); template
    Alexandre> <typename T, char e = '\0'> void f();

    Alexandre> Then he calls f<int>().  The compiler must report an
    Alexandre> ambiguity but, if we remove trailing default arguments,
    Alexandre> the error message would look like:

    Alexandre> ?:?:Template function call is ambiguous.  Available
    Alexandre> specializations are: ?:?: f<int>() ?:?: f<int>()

    Alexandre> This would seem rather confusing, although line numbers
    Alexandre> might help.

    Alexandre> -- Alexandre Oliva mailto:oliva@dcc.unicamp.br
    Alexandre> mailto:aoliva@acm.org http://www.dcc.unicamp.br/~oliva
    Alexandre> Universidade Estadual de Campinas, SP, Brasil

-- 
Mark Mitchell <mmitchell@usa.net>
http://home.earthlink.net/~mbmitchell
Consulting Services Available

  parent reply	other threads:[~1998-04-16 23:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-14 15:23 Anthony Shipman
1998-04-15  7:39 ` David Cogen
1998-04-15 14:53   ` Mark Schaefer
1998-04-15 14:53     ` David Cogen
1998-04-15 23:03       ` Joe Buck
1998-04-16  6:10         ` David Cogen
1998-04-16  2:26       ` Per Bothner
1998-04-16 16:34       ` Anthony Shipman
1998-04-17  2:23         ` Pieter Nagel
1998-04-17 14:42         ` David Cogen
1998-04-15 23:03     ` Joe Buck
1998-04-16 16:34   ` Craig Burley
1998-04-15 14:53 ` Joe Buck
1998-04-16  0:01   ` Mark Mitchell
1998-04-16 18:39     ` Alexandre Oliva
1998-04-16 22:46       ` Best optimization on UltraSparc? Dax Kelson
1998-04-16 23:59       ` Mark Mitchell [this message]
1998-04-16  5:58   ` error message formatting David Cogen
1998-04-16 13:53     ` David Cogen
1998-04-21 17:06   ` Lassi A. Tuura
1998-04-15 14:53 Mike Stump
1998-04-15 20:39 ` Joe Buck
1998-04-16 10:51   ` Per Bothner
1998-04-16 13:53     ` Joe Buck
1998-04-16  5:58 ` David Cogen
1998-04-16 14:20 Mike Stump
1998-04-20 11:44 Kaz Kylheku

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=199804162313.QAA29122@mail.earthlink.net \
    --to=mmitchell@usa.net \
    --cc=als@tusc.com.au \
    --cc=egcs@cygnus.com \
    --cc=jbuck@synopsys.com \
    --cc=oliva@dcc.unicamp.br \
    /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).