lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] gcc -fprofile-generate and -fprofile-use [Was: gcc -flto]


From: Greg Chicares
Subject: [lmi] gcc -fprofile-generate and -fprofile-use [Was: gcc -flto]
Date: Tue, 27 Dec 2016 14:59:36 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

On 2016-12-24 22:41, Greg Chicares wrote:
[...]
> /opt/lmi/src/lmi[0]$make clean
> rm --force --recursive /opt/lmi/src/lmi/../build/lmi/Linux/gcc/ship
> /opt/lmi/src/lmi[0]$make debug_flag= gprof_flag="-fprofile-generate" 
> $coefficiency install check_physical_closure >../log 2>&1 
> /opt/lmi/src/lmi[0]$make system_test 
> System test:
> 
> Now I manually remove everything in the build directly except the
> 116 '.gcda' files that total 2.7 MB, and...
> 
> /opt/lmi/src/lmi[0]$time make gprof_flag="-fprofile-use" $coefficiency 
> install check_physical_closure >../log 2>&1 

With inadequate care, while battling insomnia, I repeated those steps
except that instead of manually removing everything except '*.gcda'
I did 'make clean' (removing even '*.gcda'), and then something odd
happened:

i686-w64-mingw32-g++ -MMD -MP -MT operations_posix_windows.o -MF 
operations_posix_windows.d  -c -I /opt/lmi/src/lmi -I 
/opt/lmi/src/lmi/tools/pete-2.1.1 -I 
/opt/lmi/local/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I 
/opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I 
/opt/lmi/third_party/src -I /opt/lmi/local/include -I 
/opt/lmi/local/include/libxml2 -DLMI_WX_NEW_USE_SO  -DLIBXML_USE_DLL -DSTRICT   
 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DBOOST_STRICT_CONFIG   
-std=c++11 -pedantic-errors -Werror -Wall -Wcast-align -Wconversion 
-Wdeprecated-declarations -Wdisabled-optimization -Wextra -Wimport -Wmultichar 
-Wpacked -Wpointer-arith -Wredundant-decls -Wsign-compare -Wundef 
-Wwrite-strings  -Wno-long-long -Wctor-dtor-privacy -Wdeprecated 
-Wnon-template-friend -Woverloaded-virtual -Wpmf-conversions -Wsynth  
-Wcast-qual  -Wno-unused-parameter -Wno-conversion -Wno-deprecated-declarations 
-Wno-parentheses -Wno-unused-local-typedefs -Wno-unused-variable     -ggdb -O2 
-fno-omit-frame-pointer -fprofile-use   
/opt/lmi/third_party/src/boost/libs/filesystem/src/operations_posix_windows.cpp 
-ooperations_posix_windows.o

/opt/lmi/third_party/src/boost/libs/filesystem/src/operations_posix_windows.cpp:
 In function 'bool boost::filesystem::equivalent(const 
boost::filesystem::path&, const boost::filesystem::path&)':
/opt/lmi/third_party/src/boost/libs/filesystem/src/operations_posix_windows.cpp:524:25:
 error: 'error1' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
           ph1, error1 ) );
                         ^
cc1plus: all warnings being treated as errors
/opt/lmi/src/lmi/workhorse.make:779: recipe for target 
'operations_posix_windows.o' failed

I think that warning is correct: if
       p1.handle != BOOST_INVALID_HANDLE_VALUE
    && p2.handle == BOOST_INVALID_HANDLE_VALUE
then 'error1' is used without ever having been initialized. But, if so,
I wonder why we've never seen that warning before: '-Wall' should enable
it, and '-Werror' should make it an error.

I won't try to figure that out, or to fix the defect. Only the text of
an exception is affected, so I'll just suppress that warning for this
file.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]