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