public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65598] Fix column location for 'explicit'
Date: Fri, 27 Mar 2015 13:15:00 -0000	[thread overview]
Message-ID: <bug-65598-4-2kzqCoW4b6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65598-4@http.gcc.gnu.org/bugzilla/>

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |NEW
   Last reconfirmed|                            |2015-03-27
                 CC|                            |manu at gcc dot gnu.org
         Resolution|DUPLICATE                   |---
            Summary|Misleading error message    |Fix column location for
                   |for out-of-class definition |'explicit'
                   |of explicit conversion      |
                   |operator                    |
     Ever confirmed|0                           |1

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> GCC 5 says:
> 
> e.cc:6:42: error: ‘explicit’ outside class declaration
>    explicit ExplicitTest::operator bool() const
>                                           ^
> 
> (The caret position is a well known issue with all error locations, there is
> work being done to improve things.)

I don't think we have a bug open for 'explicit', so this one could be it. It is
probably an EasyHack ideal for a new contributor. Please consider submitting a
patch:
https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps

Small patches don't need any copyright assignment!
>From gcc-bugs-return-482002-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Mar 27 12:58:28 2015
Return-Path: <gcc-bugs-return-482002-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 531 invoked by alias); 27 Mar 2015 12:58:27 -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 450 invoked by uid 55); 27 Mar 2015 12:58:23 -0000
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/65600] [5 Regression] bost testsuite failure: ICE: Segmentation fault
Date: Fri, 27 Mar 2015 13:29:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: hubicka at ucw dot cz
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:
Message-ID: <bug-65600-4-doMRFd2JLg@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65600-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65600-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-03/txt/msg03146.txt.bz2
Content-length: 1347

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

--- Comment #2 from Jan Hubicka <hubicka at ucw dot cz> ---
Oops, really hope this is last one  of this can of worms :(
The problem here is that resolve_speculation assumes the cgraph node exists. I
am testing the following:

Index: ipa-inline-analysis.c
==================================================================--- ipa-inline-analysis.c    (revision 221725)
+++ ipa-inline-analysis.c    (working copy)
@@ -766,15 +766,15 @@ static struct cgraph_edge *
 redirect_to_unreachable (struct cgraph_edge *e)
 {
   struct cgraph_node *callee = !e->inline_failed ? e->callee : NULL;
+  struct cgraph_node *target = cgraph_node::get_create
+              (builtin_decl_implicit (BUILT_IN_UNREACHABLE));

   if (e->speculative)
-    e = e->resolve_speculation (builtin_decl_implicit (BUILT_IN_UNREACHABLE));
+    e = e->resolve_speculation (target->decl);
   else if (!e->callee)
-    e->make_direct (cgraph_node::get_create
-              (builtin_decl_implicit (BUILT_IN_UNREACHABLE)));
+    e->make_direct (target);
   else
-    e->redirect_callee (cgraph_node::get_create
-            (builtin_decl_implicit (BUILT_IN_UNREACHABLE)));
+    e->redirect_callee (target);
   struct inline_edge_summary *es = inline_edge_summary (e);
   e->inline_failed = CIF_UNREACHABLE;
   e->frequency = 0;


  parent reply	other threads:[~2015-03-27 12:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 10:29 [Bug c++/65598] New: Misleading error message for out-of-class definition of explicit conversion operator arvo at me dot com
2015-03-27 11:17 ` [Bug c++/65598] " redi at gcc dot gnu.org
2015-03-27 11:29 ` redi at gcc dot gnu.org
2015-03-27 13:15 ` manu at gcc dot gnu.org [this message]
2015-04-22 11:57 ` [Bug c++/65598] Fix column location for 'explicit' jakub at gcc dot gnu.org
2015-05-22 11:03 ` paolo.carlini at oracle dot com
2015-05-22 14:15 ` paolo at gcc dot gnu.org
2015-05-22 14:15 ` paolo.carlini at oracle dot com

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-65598-4-2kzqCoW4b6@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).