public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29485]  New: missing diagnostic when declared inline in class declaration
@ 2006-10-16 16:46 mueller at gcc dot gnu dot org
  2006-10-16 17:01 ` [Bug c++/29485] missing diagnostic when declared inline pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mueller at gcc dot gnu dot org @ 2006-10-16 16:46 UTC (permalink / raw)
  To: gcc-bugs

Hi, 

this testcase fails to produce a "return value missing" diagnostic: 

=== Cut ===

class test
{
    bool fii(test* other)
    {
        if (!other) return false;
    }

};

=== Cut ===

Interestingly, it works when declared outside the class itself, which makes me
suspect that this is caused by some C++ parser oddity.


-- 
           Summary: missing diagnostic when declared inline in class
                    declaration
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mueller at gcc dot gnu dot org


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


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

* [Bug c++/29485] missing diagnostic when declared inline
  2006-10-16 16:46 [Bug c++/29485] New: missing diagnostic when declared inline in class declaration mueller at gcc dot gnu dot org
@ 2006-10-16 17:01 ` pinskia at gcc dot gnu dot org
  2006-10-16 17:02 ` pinskia at gcc dot gnu dot org
  2006-10-16 17:05 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-16 17:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-10-16 17:01 -------
Actually all inlined functions for C++ are missing the diagnostic:
inline int fii(int *other)
{
  if(!other)return 0;
}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|missing diagnostic when     |missing diagnostic when
                   |declared inline in class    |declared inline
                   |declaration                 |


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


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

* [Bug c++/29485] missing diagnostic when declared inline
  2006-10-16 16:46 [Bug c++/29485] New: missing diagnostic when declared inline in class declaration mueller at gcc dot gnu dot org
  2006-10-16 17:01 ` [Bug c++/29485] missing diagnostic when declared inline pinskia at gcc dot gnu dot org
@ 2006-10-16 17:02 ` pinskia at gcc dot gnu dot org
  2006-10-16 17:05 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-16 17:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-10-16 17:02 -------
(In reply to comment #0)
> Interestingly, it works when declared outside the class itself, which makes me
> suspect that this is caused by some C++ parser oddity.
Are you sure because I could reproduce the missing warning for all inline
functions with the C++ front-end.


-- 


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


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

* [Bug c++/29485] missing diagnostic when declared inline
  2006-10-16 16:46 [Bug c++/29485] New: missing diagnostic when declared inline in class declaration mueller at gcc dot gnu dot org
  2006-10-16 17:01 ` [Bug c++/29485] missing diagnostic when declared inline pinskia at gcc dot gnu dot org
  2006-10-16 17:02 ` pinskia at gcc dot gnu dot org
@ 2006-10-16 17:05 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-16 17:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-10-16 17:04 -------


*** This bug has been marked as a duplicate of 21678 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2006-10-16 17:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-16 16:46 [Bug c++/29485] New: missing diagnostic when declared inline in class declaration mueller at gcc dot gnu dot org
2006-10-16 17:01 ` [Bug c++/29485] missing diagnostic when declared inline pinskia at gcc dot gnu dot org
2006-10-16 17:02 ` pinskia at gcc dot gnu dot org
2006-10-16 17:05 ` 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).