[csw-maintainers] Error: Ambiguous "?:" expression

Jake Goerzen jgoerzen at opencsw.org
Fri Mar 12 22:51:25 CET 2010


On Thu, Mar 11, 2010 at 11:53 AM, Philip Brown <phil at bolthole.com> wrote:
> On Wed, Mar 10, 2010 at 12:55 PM, Roger Håkansson <hson at opencsw.org> wrote:
>> On 2010-03-10 18:22, Philip Brown wrote:
>>>
>>> "else 0" ???  that's just freakin wierd.
>>
>> Tell me about it...
>>
>>
>>> perhaps if you changed that to
>>>
>>> else return(NULL)
>>
>> Nope, won't work, then CC complains that "int can't be cast to tpoint".
>> That's why I added "return tpoint(0,0)", tpoint(0,0) is what the constructor
>> for tpoint class returns.
>>
>
> well, another solution, may be to replace the braindead hacked
> #define, to be a *real* function, or in this case, two functions, and
> you use the appropriate one, in the appropriate place. (hmm. could
> actually keep it as a #define if you had two separate ones)
>
> cant you cast to  (void) or something though, and that fits everything?
>
>
>
> Another "simple" road, if even  possible, though, would be to find in
> the C++ spec some simple generic language trick that allows exit from
> a constructor generically, even if unhappily.
>
> Maybe you have to do it with a throws clause, rather than a return.
>
> or heck, forget the return, and just do exit(1). and/or use special
> defines/comments that make the compiler shut up.
>
> used to be, /* ARGSUSED */ was a nice little magic thing,, for lint at least.
> _______________________________________________
> maintainers mailing list
> maintainers at lists.opencsw.org
> https://lists.opencsw.org/mailman/listinfo/maintainers
> .:: This mailing list's archive is public. ::.
>

Thank you Phil and Roger for helping me with the code fixes. ;-)  I
have commited Revision: 9117 which contains all the patches and work
we have done so far.  At the moment the GAR recipe will almost finish
building but there is at least one more problem to fix but we are very
close to getting this thing wrapped up.  At the moment compiling stops
at time.cpp:


        /opt/studio/SOS11/SUNWspro/bin/CC -DHAVE_CONFIG_H -I. -I..
-I/opt/csw/include -I/opt/csw/include -I/opt/csw/include/pango-1.0
-I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include
-I/opt/csw/include/cairo -I/opt/csw/include   -DHAVE_REVISION
-I../intl -I../intl -I/opt/csw/include/SDL -D_GNU_SOURCE=1
-D_REENTRANT -DWESNOTH_PATH=\"/opt/csw/share/wesnoth\"
-DLOCALEDIR=\"translations\" -DHAS_RELATIVE_LOCALEDIR=1
-DFIFODIR=\"/var/opt/csw/run\" -DWESNOTH_PREFIX=\"/opt/csw\"
-features=extensions -library=stlport4 -DDISABLE_POOL_ALLOC
-I/opt/csw/include -c -o time.o time.cpp
"time.hpp", line 29: Error: Type name expected instead of "size_t".
"time.hpp", line 30: Error: Type name expected instead of "size_t".
"time.hpp", line 31: Error: Type name expected instead of "size_t".
"time.hpp", line 45: Error: Type name expected instead of "size_t".
"time.hpp", line 45: Error: Identifier expected instead of "const".
"time.hpp", line 45: Error: Use ";" to terminate declarations.
"time.hpp", line 46: Error: Use ";" to terminate declarations.
"time.hpp", line 46: Error: ")" expected instead of "fps".
"time.hpp", line 46: Error: ) is not defined.
"time.hpp", line 47: Error: ")" expected instead of "ms".
"time.hpp", line 47: Error: ) is not defined.
"time.hpp", line 49: Error: Type name expected instead of "size_t".
"time.hpp", line 49: Error: Identifier expected instead of "const".
"time.hpp", line 49: Error: Multiple declaration for const.
"time.hpp", line 49: Error: Use ";" to terminate declarations.
"time.hpp", line 51: Error: Use ";" to terminate declarations.
"time.cpp", line 30: Error: time_ is not defined.
"time.cpp", line 40: Error: start_frame(const bool) is not a member of
ntime::source.
"time.cpp", line 55: Error: time_ is not defined.
"time.cpp", line 64: Error: time_ is not defined.
"time.cpp", line 71: Error: time_ is not defined.
"time.cpp", line 85: Error: set_frame_rate(const unsigned) is not a
member of ntime::source.
"time.cpp", line 90: Error: set_frame_time(const unsigned) is not a
member of ntime::source.
"time.cpp", line 95: Error: get_time() is not a member of ntime::source.
24 Error(s) detected.
gmake[4]: *** [time.o] Error 24
gmake[4]: Leaving directory
`/home/jgoerzen/mgar/wesnoth/trunk/work/solaris8-i386/build-isa-i386/wesnoth-1.6.5/src


More information about the maintainers mailing list