public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/64864] New: [5 Regression] preprocessor linemarkers break configure checks
Date: Thu, 29 Jan 2015 17:08:00 -0000	[thread overview]
Message-ID: <bug-64864-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2015-01-29 17:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 17:08 trippels at gcc dot gnu.org [this message]
2015-01-29 17:18 ` [Bug preprocessor/64864] " jakub at gcc dot gnu.org
2015-01-29 17:20 ` jakub at gcc dot gnu.org
2015-01-29 17:36 ` jakub at gcc dot gnu.org
2015-01-29 17:39 ` mpolacek at gcc dot gnu.org
2015-01-30  9:12 ` dodji at seketeli dot org
2015-01-30 11:34 ` rguenth at gcc dot gnu.org
2015-02-08 20:14 ` trippels at gcc dot gnu.org
2015-02-18 13:44 ` trippels at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64864-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).