public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: rodrigc@gcc.gnu.org
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: Re: c++/71
Date: Mon, 28 May 2001 19:56:00 -0000	[thread overview]
Message-ID: <20010529025603.9891.qmail@sourceware.cygnus.com> (raw)

The following reply was made to PR c++/71; it has been noted by GNATS.

From: rodrigc@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, jmaurer@menuett.rhein-main.de, rodrigc@gcc.gnu.org,
  martin@loewis.home.cs.tu-berlin.de, nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/71
Date: 29 May 2001 02:47:33 -0000

 Synopsis: C++ typedef redefinitions and templates
 
 State-Changed-From-To: analyzed->closed
 State-Changed-By: rodrigc
 State-Changed-When: Mon May 28 19:47:32 2001
 State-Changed-Why:
     The C++ Standard, section 7.1.3, paragraph 2 states
     that:
     "In a given scope, a typedef specifier can be used
     to redefine the name of any type
     declared in that scope to refer
     to the type to which it already refers:
     
     typedef int I;
     typedef int I;
     
     In your example
     
        template<class T>
        struct A {
     	 typedef int X;
     	 typedef T X;
        };
     
     Although T may expand to an int when the template is 
     instantiated, in the scope of the template itself, the
     two typedefs are assigning different types to X.
     
     The same error message is generated when compiling with
     gcc 3.0
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=71&database=gcc


                 reply	other threads:[~2001-05-28 19:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20010529025603.9891.qmail@sourceware.cygnus.com \
    --to=rodrigc@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /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).