public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40749]  New: g++ doesnt report missing return if return is of type const <type>
@ 2009-07-14 17:13 mfribeiro at gmail dot com
  2009-07-15  9:37 ` [Bug c++/40749] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: mfribeiro at gmail dot com @ 2009-07-14 17:13 UTC (permalink / raw)
  To: gcc-bugs

This code below wont generate a warning for function a(). Compiled with -Wall.
If you remove the const from the return, it will work.

<code>
class A {
public:
};

const A a() {
}

int main() {
  A b = a();
}
</code>


-- 
           Summary: g++ doesnt report missing return if return is of type
                    const <type>
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mfribeiro at gmail dot com
 GCC build triplet: x86_64 GNU/Linux
  GCC host triplet: x86_64 GNU/Linux
GCC target triplet: x86_64 GNU/Linux


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


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

end of thread, other threads:[~2009-12-26 21:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-14 17:13 [Bug c++/40749] New: g++ doesnt report missing return if return is of type const <type> mfribeiro at gmail dot com
2009-07-15  9:37 ` [Bug c++/40749] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
2009-07-17 19:57 ` simartin at gcc dot gnu dot org
2009-07-17 22:03 ` simartin at gcc dot gnu dot org
2009-07-22 21:58 ` rguenth at gcc dot gnu dot org
2009-07-26  8:17 ` simartin at gcc dot gnu dot org
2009-07-26 16:05 ` simartin at gcc dot gnu dot org
2009-07-26 16:12 ` [Bug c++/40749] [4.3 " simartin at gcc dot gnu dot org
2009-08-04 12:49 ` rguenth at gcc dot gnu dot org
2009-12-26 13:54 ` paolo dot carlini at oracle dot com
2009-12-26 21:50 ` paolo dot carlini at oracle dot com

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