https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64864
Bug ID: 64864
Summary: [5 Regression] preprocessor linemarkers break
configure checks
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
CC: dodji at gcc dot gnu.org
For example (this happens for many projects that check for the boost version):
...
checking for working strtod... yes
checking for gettimeofday... yes
checking for Boost headers version >= 1.36.0... yes
checking for Boost's header version...
configure: error: invalid value: boost_major_version=
markus@x4 core % cat test.cpp
#include <boost/version.hpp>
boost-lib-version = BOOST_LIB_VERSION
markus@x4 core % g++ -E test.cpp
# 1 "test.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "test.cpp"
# 1 "/usr/include/boost/version.hpp" 1 3 4
# 2 "test.cpp" 2
boost-lib-version =
# 2 "test.cpp" 3 4
"1_56"
markus@x4 core % /usr/x86_64-pc-linux-gnu/gcc-bin/4.9.2/g++ -E test.cpp
# 1 "test.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "test.cpp"
# 1 "/usr/include/boost/version.hpp" 1 3 4
# 2 "test.cpp" 2
boost-lib-version = "1_56"
I know that these linemarkers are valid.
But is it really necessary that they appear in the middle of statements?
Using -P is a workaround, that apparently nobody uses in configure scripts.
See also PR64604.