c++ - "type qualifiers and static ..." error
- W這dzimierz Skiba (17/17) Jan 21 2003 Compiling source here I found dm c++ returns error for some specific
- Walter (8/25) Jan 21 2003 I fixed a similar problem in the latest beta. Try it and see if the prob...
- W這dzimierz Skiba (25/28) Jan 22 2003 Ok. I have tested latest beta and the problem is still there but error m...
- Walter (6/34) Jan 22 2003 I can take it from here. Thanks! -Walter
Compiling source here I found dm c++ returns error for some specific syntax: static void Func(...) { ... VECTOR const& E = Superellipsoid->Power; ^ source\super.cpp(480) : Error: type qualifiers and static can only appear in outermost array of function parameter This construction compiled fine with gcc (various ports), intel c++, visual c++, borland c++ and two mac compilers. But error appeared in Digital Mars C++. Intentional or accidental ? Any idea ? I already solved it own way but I report it here in case it can be a bug. VECTOR type is as follow: #define DBL double typedef DBL VECTOR[3]; Do you need more informations ? ABX
Jan 21 2003
I fixed a similar problem in the latest beta. Try it and see if the problem goes away, if not, a small reproducible example showing the problem would be nice. -Walter "W這dzimierz Skiba" <abx abx.art.pl> wrote in message news:b0j4l9$2e0c$1 digitaldaemon.com...Compiling source here I found dm c++ returns error for some specific syntax: static void Func(...) { ... VECTOR const& E = Superellipsoid->Power; ^ source\super.cpp(480) : Error: type qualifiers and static can onlyappearin outermost array of function parameter This construction compiled fine with gcc (various ports), intel c++,visual c++,borland c++ and two mac compilers. But error appeared in Digital Mars C++. Intentional or accidental ? Any idea ? I already solved it own way but Ireport ithere in case it can be a bug. VECTOR type is as follow: #define DBL double typedef DBL VECTOR[3]; Do you need more informations ? ABX
Jan 21 2003
"Walter" <walter digitalmars.com> wrote in news:b0j4pn$2e78$1 digitaldaemon.com:I fixed a similar problem in the latest beta. Try it and see if the problem goes away, if not, a small reproducible example showing the problem would be nice. -WalterOk. I have tested latest beta and the problem is still there but error message is different: "need explicit cast to convert". Here is small code similiar to original file as much as possible: typedef double VECTOR[3]; typedef struct Object_Struct OBJECT; struct Object_Struct { VECTOR Power; }; static void Superellipsoid_Normal(OBJECT *Object) { VECTOR const& E = Object->Power; } and here is command and output: sc -c source\super.cpp -odmdos\obj\src\super.obj -mn -6 -ff -WA -Ae VECTOR const& E = Object->Power; ^ source\super.cpp(11) : Error: need explicit cast to convert from: double ** to : double [const 3]* Above small code is still correctly compiled with other compilers. Should I additionally make posting follow http://www.digitalmars.com/bugs.html ? ABX
Jan 22 2003
I can take it from here. Thanks! -Walter "W這dzimierz Skiba" <abx abx.art.pl> wrote in message news:b0m85a$14pq$1 digitaldaemon.com..."Walter" <walter digitalmars.com> wrote in news:b0j4pn$2e78$1 digitaldaemon.com:message isI fixed a similar problem in the latest beta. Try it and see if the problem goes away, if not, a small reproducible example showing the problem would be nice. -WalterOk. I have tested latest beta and the problem is still there but errordifferent: "need explicit cast to convert". Here is small code similiar tooriginalfile as much as possible: typedef double VECTOR[3]; typedef struct Object_Struct OBJECT; struct Object_Struct { VECTOR Power; }; static void Superellipsoid_Normal(OBJECT *Object) { VECTOR const& E = Object->Power; } and here is command and output: sc -c source\super.cpp -odmdos\obj\src\super.obj -mn -6 -ff -WA -Ae VECTOR const& E = Object->Power; ^ source\super.cpp(11) : Error: need explicit cast to convert from: double ** to : double [const 3]* Above small code is still correctly compiled with other compilers. Should I additionally make posting followhttp://www.digitalmars.com/bugs.html ?ABX
Jan 22 2003