www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - compiler messages

reply Ant <duitoolkit yahoo.ca> writes:
I have several hundreds of this message from a compilation:

src/gdk/typedefs.d(3097): variable gdk.typedefs.GdkEvent.key no 
definition of struct GdkEventKey

should that (the repetition)  be considered a bug independently of the 
source code being correct or not?
I'm suggesting the compiler should omit consecutive repeated messages.

Ant
Dec 10 2006
parent reply Lionello Lunesu <lio lunesu.remove.com> writes:
Ant wrote:
 I have several hundreds of this message from a compilation:
 
 src/gdk/typedefs.d(3097): variable gdk.typedefs.GdkEvent.key no 
 definition of struct GdkEventKey
 
 should that (the repetition)  be considered a bug independently of the 
 source code being correct or not?
 I'm suggesting the compiler should omit consecutive repeated messages.
 
 Ant
Somebody else made mention of this. It seems s/he had to change struct StructName; to struct StructName{} for forward declarations.. Doesn't seem right to me, but it'll help you compile your project. L.
Dec 11 2006
parent reply %u <duitoolkit yahoo.ca> writes:
== Quote from Lionello Lunesu (lio lunesu.remove.com)'s article

 Somebody else made mention of this...
So is Walter aware the compiler can emit hundreds of repeated messages? (I guess I should check the bug repository...) Ant
Dec 11 2006
parent Ary Manzana <ary esperanto.org.ar> writes:
%u escribió:
 == Quote from Lionello Lunesu (lio lunesu.remove.com)'s article
 
 Somebody else made mention of this...
So is Walter aware the compiler can emit hundreds of repeated messages? (I guess I should check the bug repository...) Ant
This I had to face while porting the DMD parser to Java. The solution (at least in the parser) was to break some specific while(true) loops if the token read was TOKeof. Some loops currently request the next token, if it's not the expected token signal an error, and then request the next token again. This goes forever if the token is TOKeof. At some point, if more than 20 errors (I think) are gatheres, the program exits abruptly. This saves the compiler from looping undefinitely, but it's not a nice solution. I don't if Walter is aware of this, but the fix should be easy. :-)
Dec 11 2006