[Olsr-dev] Android NDK does not support -Wdouble-promotion, -Wjump-misses-init, and -Wtrampolines

Hans-Christoph Steiner (spam-protected)
Wed Jun 6 23:55:53 CEST 2012


Yes, that is intro to gcc warnings ;)  but some of these are pretty
specific cases.  I've never heard of "trampolines" and reading the
description, it sounds like a very specific practice that I have never
seen in code nor heard discussed.  -Wdouble-promotion sounds useful on
embedded CPUs.  As for gotos, IMHO, its good practice to avoid them all
together...

Sorry I'm obsessing on this, one of my goals is to make stable,
repeatable builds, so when it breaks, I want to know what the options
are for making it more reliable.

.hc

On 06/06/2012 05:25 PM, Henning Rogge wrote:
> I use even more on the framework code, including -Werror.
> 
> Every warning is a "bad coding style" or a potential problem. So
> instead of switching the warning off, we try to fix the code.
> 
> Henning
> 
> On Wed, Jun 6, 2012 at 11:11 PM, Hans-Christoph Steiner
> <(spam-protected)> wrote:
>>
>> Hmm, ok, that explains something.  The warning removing script worked on
>> the build server, but not on my Ubuntu/precise laptop, I don't know why
>> yet...
>>
>> I've never dealt with any project that has such elaborate gcc warnings.
>>  I'm curious what about olsrd needs this level of warnings, can anyone
>> illuminate me?
>>
>> .hc
>>
>> On 06/06/2012 04:53 PM, Henning Rogge wrote:
>>> Normally, the "gcc warning" script should check which options produce
>>> an error and remove them...
>>>
>>> strange...
>>>
>>> Henning
>>>
>>> On Wed, Jun 6, 2012 at 10:50 PM, Ferry Huberts <(spam-protected)> wrote:
>>>>
>>>>
>>>> On 06-06-12 22:35, Hans-Christoph Steiner wrote:
>>>>>
>>>>>
>>>>> Why do we need to have the warning flags individually specified?  I
>>>>
>>>>
>>>> because some flags aren't included in -Wall (pls read man gcc)
>>>>
>>>>
>>>>> think it would be safer to use -Wall, then use -Wno-foo to only specify
>>>>> warnings we don't want.  That way we don't have to manage the
>>>>> differences in toolchains.
>>>>>
>>>>> Here's what Android NDK's gcc has to say:
>>>>>
>>>>> [CC] src/common/autobuf.c
>>>>> cc1: error: unrecognized command line option "-Wdouble-promotion"
>>>>> cc1: error: unrecognized command line option "-Wjump-misses-init"
>>>>> cc1: error: unrecognized command line option "-Wtrampolines"
>>>>>
>>>>
>>>> put an ifndef android around them ;-)
>>>>
>>>>
>>>>>
>>>>> (spam-protected) olsrd $
>>>>>
>>>>> /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
>>>>>  -Wdouble-promotion /tmp/test.c
>>>>> cc1: error: unrecognized command line option "-Wdouble-promotion"
>>>>>
>>>>> .hc
>>>>>
>>>>
>>>> --
>>>> Ferry Huberts
>>>>
>>>>
>>>> --
>>>> Olsr-dev mailing list
>>>> (spam-protected)
>>>> https://lists.olsr.org/mailman/listinfo/olsr-dev
>>>
>>>
>>>
> 
> 
> 




More information about the Olsr-dev mailing list