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]

[C++ PATCH] Fix bug 72


Hi,
this fixes bug 72, where we rejected duplicate typedefs too early.

Duplicate typedefs are ok, if they are of the same type. In a
template declaration we could have
	typedef int xxx;
	typedef typename A<T>::type xxx;
we would reject this at definition time, rather than wait until
instantiation and see whether  A<T>::type is or is not
an int.

Note, at definition time, it doesn't matter which of these two
a later name lookup obtains, as they must be the same for a valid
template instantiation.

booted & tested on i686-pc-linux-gnu, ok?

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

Attachment: 72.patch
Description: Binary data

Attachment: 72.C
Description: Binary data

Attachment: 72-2.C
Description: Binary data


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