public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/59663] New: [4.9 Regression] config/darwin.c:3665:1: error: control reaches end of non-void function [-Werror=return-type]
@ 2014-01-03  9:14 burnus at gcc dot gnu.org
  2014-01-04 18:40 ` [Bug target/59663] [4.9 Regression] Bootstrap failure: " burnus at gcc dot gnu.org
  2014-01-04 18:48 ` dominiq at lps dot ens.fr
  0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2014-01-03  9:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59663
           Summary: [4.9 Regression] config/darwin.c:3665:1: error:
                    control reaches end of non-void function
                    [-Werror=return-type]
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org, marxin.liska at gmail dot com
            Target: *-*-darwin*

Cf. https://trac.macports.org/ticket/41964 and PR59654 comment 20.

gcc/config/darwin.c: In function 'section* darwin_function_section(tree,
node_frequency, bool, bool)':
gcc/config/darwin.c:3665:1: error: control reaches end of non-void function
[-Werror=return-type]
 }

I think the culprit is Martin's patch r206070 - as there is no return after the
"switch":


@@ -3642,6 +3649,11 @@ darwin_function_section (tree decl, enum node_frequency 
       case NODE_FREQUENCY_HOT:
-       return (weak)
-               ? darwin_sections[text_hot_coal_section]
-               : darwin_sections[text_hot_section];
-       break;
+      {
+     /* If we do have a profile or(and) LTO phase is executed, we do not need
+           these ELF section.  */
+        if (!in_lto_p || !flag_profile_values)
+          return (weak)
+                  ? darwin_sections[text_hot_coal_section]
+                  : darwin_sections[text_hot_section];
+        break;
+      }


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

end of thread, other threads:[~2014-01-04 18:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-03  9:14 [Bug target/59663] New: [4.9 Regression] config/darwin.c:3665:1: error: control reaches end of non-void function [-Werror=return-type] burnus at gcc dot gnu.org
2014-01-04 18:40 ` [Bug target/59663] [4.9 Regression] Bootstrap failure: " burnus at gcc dot gnu.org
2014-01-04 18:48 ` dominiq at lps dot ens.fr

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