Skip to content

Warns maybe-uninitialized on g++-6 #34

@biojppm

Description

@biojppm

A quick one:

$ cmake -DCMAKE_CXX_COMPILER=g++-6 ..

causes this:

In file included from /opt/jpmag/proj/extern/fast_float/include/fast_float/ascii_number.h:9:0,
                 from /opt/jpmag/proj/extern/fast_float/include/fast_float/parse_number.h:3,
                 from /opt/jpmag/proj/extern/fast_float/include/fast_float/fast_float.h:44,
                 from /opt/jpmag/proj/extern/fast_float/tests/random_string.cpp:1:
/opt/jpmag/proj/extern/fast_float/include/fast_float/float_common.h: In function ‘fast_float::adjusted_mantissa fast_float::parse_long_mantissa(const char*, const char*) [with binary = fast_float::binary_format<double>]’:
/opt/jpmag/proj/extern/fast_float/include/fast_float/float_common.h:134:35: error: ‘answer.fast_float::adjusted_mantissa::mantissa’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     return mantissa == o.mantissa && power2 == o.power2;
            ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /opt/jpmag/proj/extern/fast_float/include/fast_float/parse_number.h:4:0,
                 from /opt/jpmag/proj/extern/fast_float/include/fast_float/fast_float.h:44,
                 from /opt/jpmag/proj/extern/fast_float/tests/random_string.cpp:1:
/opt/jpmag/proj/extern/fast_float/include/fast_float/decimal_to_binary.h:73:21: note: ‘answer.fast_float::adjusted_mantissa::mantissa’ was declared here
   adjusted_mantissa answer;
                     ^~~~~~
make[1]: *** [CMakeFiles/Makefile2:216: tests/CMakeFiles/long_exhaustive32_64.dir/all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions