public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39511]  New: Bad warning, with return type, switch and enum
@ 2009-03-20  5:41 alpha dot super-one at laposte dot net
  2009-04-16 20:39 ` [Bug c++/39511] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: alpha dot super-one at laposte dot net @ 2009-03-20  5:41 UTC (permalink / raw)
  To: gcc-bugs

I have:
main.cpp: In function 'QString parityToString(ParityType)':
main.cpp:312: warning: control reaches end of non-void function
When:
enum ParityType 
{
    PAR_NONE,
    PAR_ODD,
    PAR_EVEN,
    PAR_MARK,               //WINDOWS ONLY
    PAR_SPACE
};
And my function:
QString parityToString(ParityType value)
{
        switch(value)
        {
                case PAR_NONE:
                        return "none";
                case PAR_ODD:
                        return "odd";
                case PAR_EVEN:
                        return "even";
                case PAR_MARK:
                        return "mark";
                case PAR_SPACE:
                        return "space";
        }
}


-- 
           Summary: Bad warning, with return type, switch and enum
           Product: gcc
           Version: 4.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: alpha dot super-one at laposte dot net


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


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

end of thread, other threads:[~2010-12-19 18:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-39511-4@http.gcc.gnu.org/bugzilla/>
2010-12-19 18:55 ` [Bug c++/39511] Bad warning, with return type, switch and enum redi at gcc dot gnu.org
2009-03-20  5:41 [Bug c++/39511] New: " alpha dot super-one at laposte dot net
2009-04-16 20:39 ` [Bug c++/39511] " pinskia at gcc dot gnu dot org
2009-04-17  4:51 ` alpha dot super-one at laposte dot net
2009-04-17  4:55 ` pinskia at gcc dot gnu dot org
2009-04-17  5:06 ` alpha dot super-one at laposte dot net

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