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

Jake Goerzen jgoerzen at opencsw.org
Tue Mar 9 18:28:35 CET 2010


On Tue, Mar 9, 2010 at 8:27 AM, Philip Brown <phil at bolthole.com> wrote:
> On Tue, Mar 9, 2010 at 12:56 AM, Roger Håkansson <hson at opencsw.org> wrote:
>>
>> Report to upstream, I'm no C++ guru, but in my mind that seems like code
>> that isn't really following the standard.
>> Sun Studio 11 isn't really that perfect either, but even 12 U1 doesn't
>> compile that code so I would say that they use some kind of gcc-ism...
>>
>
> in some cases, its not so much that they use a feature of gcc,but that
> they rely on default behaviour of it. That being said... I vaguely
> recall that, back in the day, there are warning flags in gcc you can
> turn on, that make it (almost) as cautious about these things as sun
> studio.
>
> So, an even better thing for you to look into, would be to see if you
> can find the g++ flag that triggers a warning on the original code,
> then suggest to upstream, "please compile with these flags from now
> on".

This would cause them to have to fix their code right?
I would guess this would be either -Wall or -Wextra?  I know that
-Wall is already there because I've had to take it out so SunCC would
compile it.

Looking closer at the 9 errors that stopped the compile I notice they
are all complaining about const expected to return a value:

"./gui/widgets/generator_private.hpp", line 173: Error:
"gui2::policy::placement::thorizontal_list::calculate_best_size()
const" is expected to return a value.


Approximately line 173 generator_private.hpp:

        tpoint calculate_best_size() const
                { ERROR_LOG(false); }


If anyone would take a closer look and help me I will gather up all
these fixes and then submit an upstream patch.

Thanks!
Jake


More information about the maintainers mailing list