public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@cygnus.com>
To: mmitchell@usa.net
Cc: Ross Alexander <rossa@stimpy.math.auckland.ac.nz>,
	egcs@cygnus.com, law@cygnus.com
Subject: Re: Error in 971122 i686-pc-linux-gnu
Date: Fri, 28 Nov 1997 02:23:00 -0000	[thread overview]
Message-ID: <u93ekhe2rp.fsf@yorick.cygnus.com> (raw)
In-Reply-To: <199711272141.VAA00141@quickstep.stanford.edu>

Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* pt.c (check_explicit_specialization): Complain about using a 
	template-id for a non-specialization.

Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>

        * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.

Index: error.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/cp/error.c,v
retrieving revision 1.87
diff -c -r1.87 error.c
*** error.c	1997/11/19 19:52:28	1.87
--- error.c	1997/11/28 09:57:11
***************
*** 776,781 ****
--- 776,799 ----
        }
        break;
  
+     case TEMPLATE_ID_EXPR:
+       {
+ 	tree args;
+ 	dump_type (TREE_OPERAND (t, 0), v);
+ 	OB_PUTC ('<');
+ 	for (args = TREE_OPERAND (t, 1); args; args = TREE_CHAIN (args))
+ 	  {
+ 	    if (TREE_CODE_CLASS (TREE_CODE (TREE_VALUE (args))) == 't')
+ 	      dump_type (TREE_VALUE (args), 0);
+ 	    else
+ 	      dump_expr (TREE_VALUE (args), 0);
+ 	    if (TREE_CHAIN (args))
+ 	      OB_PUTC2 (',', ' ');
+ 	  }
+ 	OB_PUTC ('>');
+       }
+       break;
+ 
      case LABEL_DECL:
        OB_PUTID (DECL_NAME (t));
        break;
Index: pt.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/cp/pt.c,v
retrieving revision 1.270
diff -c -r1.270 pt.c
*** pt.c	1997/11/27 19:25:31	1.270
--- pt.c	1997/11/28 10:18:15
***************
*** 496,507 ****
  	  && !processing_explicit_specialization (template_count)
  	  && !is_friend)
  	{
! 	  if (!have_def)
  	    /* This is not an explicit specialization.  It must be
  	       an explicit instantiation.  */
  	    return 2;
  	  else if (pedantic)
! 	    pedwarn ("Explicit specialization not preceeded by `template <>'");
  	}
  
        if (TREE_CODE (declarator) != TEMPLATE_ID_EXPR)
--- 496,514 ----
  	  && !processing_explicit_specialization (template_count)
  	  && !is_friend)
  	{
! 	  if (!have_def && ! template_header_count)
  	    /* This is not an explicit specialization.  It must be
  	       an explicit instantiation.  */
  	    return 2;
+ 	  else if (template_header_count > template_count
+ 		   && !processing_specialization)
+ 	    {
+ 	      cp_error ("template-id `%D' in declaration of primary template",
+ 			declarator);
+ 	      return 0;
+ 	    }
  	  else if (pedantic)
! 	    pedwarn ("explicit specialization not preceeded by `template <>'");
  	}
  
        if (TREE_CODE (declarator) != TEMPLATE_ID_EXPR)

  parent reply	other threads:[~1997-11-28  2:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-27 19:10 Ross Alexander
1997-11-27 22:49 ` Mark Mitchell
1997-11-28  1:30   ` Jason Merrill
1997-11-28  2:23   ` Jason Merrill [this message]
1997-12-01 18:46     ` C9X draft online Oleg Krivosheev

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=u93ekhe2rp.fsf@yorick.cygnus.com \
    --to=jason@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=law@cygnus.com \
    --cc=mmitchell@usa.net \
    --cc=rossa@stimpy.math.auckland.ac.nz \
    /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).