> -----Original Message-----
> From: Alexandre Oliva [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 28, 2000 11:53 PM
> To: Kevin Atkinson
> Cc: [EMAIL PROTECTED]
> Subject: Re: Problem with ltdl.h
>
>
> On Nov 28, 2000, Kevin Atkinson <[EMAIL PROTECTED]> wrote:
>
> > On 28 Nov 2000, Alexandre Oliva wrote:
> >> On Nov 28, 2000, Bernard Dautrevaux
> <[EMAIL PROTECTED]> wrote:
> >>
> >> > in C++
> >> > struct lt_dlhandle
> >> > automatically define a TYPENAME i.e. makes an implicit
> >> > typedef struct lt_dlhandle lt_dlhandle;
> >>
> >> However, IIRC, it is valid to have the implicit name overridden by
> >> another definition of the name, which is what the `typedef' does.
>
> > So are you saying that you are not going to fix it.
>
> Not really. I'm just asking for better arguments to make me change my
> mind about it :-)
>
> > It does NOT appear
> > to be valid C++ code
>
> I've just managed to compile:
>
> typedef struct foo foo;
>
> with g++, version 2.95.2. So it *is* valid C++. I don't understand
> why G++ is complaining about it.
YES! this is valid; what's NOT is
typedef struct foo* foo;
^_______ notice the '*' there.
canopus{SoftWrks}: echo "typedef struct foo* foo;" > tst.cpp
canopus{SoftWrks}: gcc -c tst.cpp
tst.cpp:1: conflicting types for `typedef struct foo * foo'
tst.cpp:1: previous declaration as `struct foo'
canopus{SoftWrks}:
>
> If some widely used C++ compiler fails to compile it, for example,
> when ltdl.h is in its standard header-file search path, then we may
> have a good reason to change it. But first I want to understand the
> problem, so that it can at least be documented.
ALL C++ comilers should choke on this. AND as I say in my previous mail it
is VERY misleading to typedef a pointer to something with the same name as
this something.
Of course, as I've also said earlier, I don't have the latest CVS libtool,
so I take for granted what the initial message said, that is the offending
code is
typedef struct lt_dlhandle *lt_dlhandle;
If there is no '*', all is OK of course.
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
--------------------------------------------
_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool