public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/60594] std::function of a type with a declared (but not defined) return type fails to compile Date: Wed, 19 Mar 2014 21:22:00 -0000 [thread overview] Message-ID: <bug-60594-4-T5XqB8E7gi@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-60594-4@http.gcc.gnu.org/bugzilla/> [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 4387 bytes --] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60594 Daniel Krügler <daniel.kruegler at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler@googlemail. | |com --- Comment #4 from Daniel Krügler <daniel.kruegler at googlemail dot com> --- (In reply to Jonathan Wakely from comment #1) > Are you sure this is valid? I tend to say it is valid, see below for a further comment on this. > Instantiating std::function (like most std::lib > templates) with an incomplete type is undefined behaviour. Is the function > type bar() complete if bar is not complete? This is definitively true (i.e. bar() is a complete type), because function types are not affected by the definition of complete types, 3.9 p. says: "Incompletely defined object types and the void types are incomplete types (3.9.1)." I would say that the definition of "INVOKE(f, t1, t2, ..., tN, R)" is not well-defined for incomplete R (except when R==void) due to the "implicitly-convertible" constraint mentioned in 20.9.2 p2, but 20.9.11 doesn't seem to impose this constraint to hold when instantiating a std::function<>. On the other hand the current std::function wording clearly is underspecified: There are several members that would require R to be a complete type. I don't think that the default constructor is one of these, though. Among the members where this is needed is IMO template<class F> function(F f); because the compile-time constraint "unless f is Callable (20.9.11.2) for argument types ArgTypes... and return type R." can only be deduced, if R is complete (modulo void again). >From gcc-bugs-return-446941-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Mar 19 21:30:40 2014 Return-Path: <gcc-bugs-return-446941-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 9421 invoked by alias); 19 Mar 2014 21:30:40 -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 9398 invoked by uid 48); 19 Mar 2014 21:30:37 -0000 From: "patnel97269-gfortran at yahoo dot fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/60596] New: Inquire size for stream zero Date: Wed, 19 Mar 2014 21:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: patnel97269-gfortran at yahoo dot fr X-Bugzilla-Status: UNCONFIRMED 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: <bug-60596-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: 2014-03/txt/msg01810.txt.bz2 Content-length: 764 http://gcc.gnu.org/bugzilla/show_bug.cgi?id`596 Bug ID: 60596 Summary: Inquire size for stream zero Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: patnel97269-gfortran at yahoo dot fr Created attachment 32398 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id2398&actioníit program Hi all, When calling inquire for a stream size, the size is reported to be zero. In the intel fortran compiler the sizer is correctly reported. I attached a small program, and the necessary input file. Use that as < input : >ONE Homo sapiens alu Thanks.
next prev parent reply other threads:[~2014-03-19 21:22 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-03-19 18:49 [Bug libstdc++/60594] New: " dblaikie at gmail dot com 2014-03-19 19:04 ` [Bug libstdc++/60594] " redi at gcc dot gnu.org 2014-03-19 19:48 ` redi at gcc dot gnu.org 2014-03-19 20:52 ` chandlerc at gmail dot com 2014-03-19 21:22 ` daniel.kruegler at googlemail dot com [this message] 2014-04-08 4:16 ` kariya_mitsuru at hotmail dot com 2014-04-08 10:07 ` redi at gcc dot gnu.org 2014-04-15 15:26 ` [Bug libstdc++/60594] [4.8/4.9/4.10 Regression] " redi at gcc dot gnu.org 2014-04-15 15:27 ` [Bug libstdc++/60594] [4.8/4.9 " redi at gcc dot gnu.org 2014-05-06 11:45 ` redi at gcc dot gnu.org 2014-05-06 13:28 ` redi at gcc dot gnu.org 2014-05-06 13:29 ` 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-60594-4-T5XqB8E7gi@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: linkBe 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).