[vwnc] [DLLCC] A more helpful error message for typedefs with structs?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] [DLLCC] A more helpful error message for typedefs with structs?

Thomas Brodt
OK, this got me an hour before I finally remembered that I had had this
before. As an example I take the OPENFILENAME struct which is present in
any image.

CommonDialogsInterface for example defines a struct OPENFILENAME.

The implementation of LPOPENFILENAME as <C: typedef void *
LPOPENFILENAME> is not totally correct, it should be a pointer to
OPENFILENAME, just for type safety reasons and access via memberAt:.

So I tried to change it to <C: typedef OPENFILENAME * LPOPENFILENAME>
which gave me a little error dialog with a name conflict for OPENFILENAME.
It took me a while (again) before I saw the reason, that it should be
<C: typedef struct OPENFILENAME * LPOPENFILENAME> instead. Oh, if only
the error message would be more informative about that.

But hey, DLLCC is going to be improved anyway with the next versions.
Don't forget this error message. ;-)

Thomas


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [DLLCC] A more helpful error message for typedefs withstructs?

Andres Valloud-6
AR 54903...

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Thomas Brodt
Sent: Thursday, July 31, 2008 6:19 AM
To: VWNC
Subject: [vwnc] [DLLCC] A more helpful error message for typedefs
withstructs?

OK, this got me an hour before I finally remembered that I had had this
before. As an example I take the OPENFILENAME struct which is present in
any image.

CommonDialogsInterface for example defines a struct OPENFILENAME.

The implementation of LPOPENFILENAME as <C: typedef void *
LPOPENFILENAME> is not totally correct, it should be a pointer to
OPENFILENAME, just for type safety reasons and access via memberAt:.

So I tried to change it to <C: typedef OPENFILENAME * LPOPENFILENAME>
which gave me a little error dialog with a name conflict for
OPENFILENAME.
It took me a while (again) before I saw the reason, that it should be
<C: typedef struct OPENFILENAME * LPOPENFILENAME> instead. Oh, if only
the error message would be more informative about that.

But hey, DLLCC is going to be improved anyway with the next versions.
Don't forget this error message. ;-)

Thomas


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc