This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix PR c++/29024


Lee Millward wrote:
On 9/25/06, Andrew STUBBS <andrew.stubbs@st.com> wrote:
Lee Millward wrote:
> This bug is an accepts valid where the presence of a storage class
> specifier in a typedef declaration wasn't being diagnosed. The
> testcase taken from the PR is:
>
> typedef static int a;
>
> which with current mainline is silently accepted. Whilst looking at
> this I noticed the following two testcases are accepted when they
> should be rejected:
>
> typedef register int b;
> typedef extern int c;

Also 'typedef auto int d;', etc.

Andrew


That was already rejected before my patch. I included in the testcase all those which should be rejected, but previously wasn't, which is why there isn't a "typedef auto int foo;" in there.

4.1.1 doesn't reject it.


Try this:

int
f()
{
  typedef auto int a;
}

Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]