public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "david.claessens at tomra dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/65928] New: std::find_if compilation errors
Date: Wed, 29 Apr 2015 10:19:00 -0000	[thread overview]
Message-ID: <bug-65928-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65928

            Bug ID: 65928
           Summary: std::find_if compilation errors
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: david.claessens at tomra dot com
  Target Milestone: ---

Created attachment 35421
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35421&action=edit
preprocessed file

COLLECT_GCC=g++-5
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
5.1.0-0ubuntu11~14.04.1' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=c++98 --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.1.0 (Ubuntu 5.1.0-0ubuntu11~14.04.1)


The code below compiles fine under 4.9.2 but gives errors under 5.1.0

compiler command: g++-5 -std=c++1y bug.cpp

adding -Wall -Wextra does not change the output for v5.1.0 but gives
unused-but-set-variable warnings on v4.9.2


#include <string>
#include <cctype>
#include <algorithm>

int main(int, char **)
{
    const std::string test_string("this is a test");

    auto first_space = std::find_if(
            std::begin(test_string),
            std::end(test_string),
            std::isblank);

    int (*myblank)(int) = &std::isblank;

    auto _space = std::find_if(
            std::begin(test_string),
            std::end(test_string),
            myblank);

    return 0;
}

The compiler output:
bug.cpp: In function ‘int main(int, char**)’:
bug.cpp:13:25: error: no matching function for call to
‘find_if(std::basic_string<char>::const_iterator,
std::basic_string<char>::const_iterator, <unresolved overloaded function
type>)’
             std::isblank);
                         ^
In file included from /usr/include/c++/5/algorithm:62:0,
                 from bug.cpp:4:
/usr/include/c++/5/bits/stl_algo.h:3806:5: note: candidate: template<class
_IIter, class _Predicate> _IIter std::find_if(_IIter, _IIter, _Predicate)
     find_if(_InputIterator __first, _InputIterator __last,
     ^
/usr/include/c++/5/bits/stl_algo.h:3806:5: note:   template argument
deduction/substitution failed:
bug.cpp:13:25: note:   couldn't deduce template parameter ‘_Predicate’
             std::isblank);
>From gcc-bugs-return-484953-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 29 10:49:50 2015
Return-Path: <gcc-bugs-return-484953-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 105906 invoked by alias); 29 Apr 2015 10:49:50 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 105866 invoked by uid 48); 29 Apr 2015 10:49:46 -0000
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/65476] Long_Float array does not byte-swap correctly with reverse Scalar_Storage_Order
Date: Wed, 29 Apr 2015 10:49:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ada
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ebotcazou at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on short_desc everconfirmed
Message-ID: <bug-65476-4-xAfylmmqxV@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65476-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65476-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg02505.txt.bz2
Content-length: 761

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide476

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-04-29
            Summary|Long_Float array does not   |Long_Float array does not
                   |byte swap correctly when    |byte-swap correctly with
                   |set to Scalar_Storage_Order |reverse
                   |with High Order First       |Scalar_Storage_Order
     Ever confirmed|0                           |1

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Confirmed.


             reply	other threads:[~2015-04-29 10:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 10:19 david.claessens at tomra dot com [this message]
2015-04-29 11:16 ` [Bug libstdc++/65928] " glisse at gcc dot gnu.org
2015-04-29 12:22 ` redi at gcc dot gnu.org
2015-04-29 12:56 ` david.claessens at tomra dot com
2015-04-29 13:00 ` redi at gcc dot gnu.org
2015-04-29 13:06 ` redi at gcc dot gnu.org
2015-04-29 13:36 ` redi 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-65928-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).