[Bug target/59663] [4.9 Regression] Bootstrap failure: config/darwin.c:3665:1: error: control reaches end of non-void function [-Werror=return-type]

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jan 4 18:40:00 GMT 2014


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0
            Summary|[4.9 Regression]            |[4.9 Regression] Bootstrap
                   |config/darwin.c:3665:1:     |failure:
                   |error: control reaches end  |config/darwin.c:3665:1:
                   |of non-void function        |error: control reaches end
                   |[-Werror=return-type]       |of non-void function
                   |                            |[-Werror=return-type]

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Draft patch – I have no idea about that code part, but the following patch
mimics what code before the switch statement. 

diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 63a385c..bb787f0 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -3654,6 +3654,8 @@ darwin_function_section (tree decl, enum node_frequency
freq,
           return (weak)
                   ? darwin_sections[text_hot_coal_section]
                   : darwin_sections[text_hot_section];
+    else
+      return text_section;
         break;
       }
       default:


More information about the Gcc-bugs mailing list