public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18969] Invalid return statement diagnosed too late
       [not found] <bug-18969-1771@http.gcc.gnu.org/bugzilla/>
@ 2006-04-14 21:03 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-14 21:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-04-14 21:03 -------
*** Bug 27167 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doug dot gregor at gmail dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18969


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/18969] Invalid return statement diagnosed too late
       [not found] <bug-18969-4@http.gcc.gnu.org/bugzilla/>
@ 2013-11-08  2:25 ` manu at gcc dot gnu.org
  0 siblings, 0 replies; 3+ messages in thread
From: manu at gcc dot gnu.org @ 2013-11-08  2:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18969

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
It works in clang:

test.cc:3:16: error: void function 'foo' should not return a value
[-Wreturn-type]
  void foo() { return 0; }
               ^      ~
>From gcc-bugs-return-433898-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 08 02:43:18 2013
Return-Path: <gcc-bugs-return-433898-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1541 invoked by alias); 8 Nov 2013 02:43:18 -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 1510 invoked by uid 48); 8 Nov 2013 02:43:15 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/18969] Invalid return statement diagnosed too late
Date: Fri, 08 Nov 2013 02:43:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.0.0
X-Bugzilla-Keywords: accepts-invalid, monitored
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-18969-4-YDptn9kCV1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-18969-4@http.gcc.gnu.org/bugzilla/>
References: <bug-18969-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg00675.txt.bz2
Content-length: 822

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18969

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Breakpoint 5, check_return_expr (retval=<integer_cst 0x7ffff7408720>,
no_warning=0x7fffffffdf2f) at /home/manuel/test1/src/gcc/cp/typeck.c:8311

B =>if (processing_template_decl)
      {
        current_function_returns_value = 1;
        if (check_for_bare_parameter_packs (retval))
          retval = error_mark_node;
        return retval;
      }

processing_template_decl is a big hammer here. We only should care about the
return type of the function or the type of the thing being returned. If those
are not dependent, then we should just give diagnostics. But we also need a way
to not repeat the diagnostics when instantiated.

It doesn't seem trivial to me.
>From gcc-bugs-return-433899-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 08 03:06:24 2013
Return-Path: <gcc-bugs-return-433899-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14522 invoked by alias); 8 Nov 2013 03:06:23 -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 14467 invoked by uid 48); 8 Nov 2013 03:06:16 -0000
From: "mingjie.xing at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/48110] __attribute__ ((optimize(...))) version of -Ofast
Date: Fri, 08 Nov 2013 03:06:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mingjie.xing at gmail dot com
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: cc
Message-ID: <bug-48110-4-HScsc24uyb@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-48110-4@http.gcc.gnu.org/bugzilla/>
References: <bug-48110-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: 2013-11/txt/msg00676.txt.bz2
Content-length: 642

http://gcc.gnu.org/bugzilla/show_bug.cgi?idH110

Mingjie Xing <mingjie.xing at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mingjie.xing at gmail dot com

--- Comment #1 from Mingjie Xing <mingjie.xing at gmail dot com> ---
The document says, "Numbers are assumed to be an optimization level. Strings
that begin with O are assumed to be an optimization option, while other options
are assumed to be used with a -f prefix."

So, it should be __attribute__ ((optimize("Ofast"))).


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/18969] Invalid return statement diagnosed too late
  2004-12-13 21:34 [Bug c++/18969] New: " reichelt at gcc dot gnu dot org
@ 2004-12-13 21:36 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-13 21:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-13 21:36 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |3.3.2 4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-13 21:36:31
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18969


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-08  2:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-18969-1771@http.gcc.gnu.org/bugzilla/>
2006-04-14 21:03 ` [Bug c++/18969] Invalid return statement diagnosed too late pinskia at gcc dot gnu dot org
     [not found] <bug-18969-4@http.gcc.gnu.org/bugzilla/>
2013-11-08  2:25 ` manu at gcc dot gnu.org
2004-12-13 21:34 [Bug c++/18969] New: " reichelt at gcc dot gnu dot org
2004-12-13 21:36 ` [Bug c++/18969] " pinskia at gcc dot gnu dot org

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).