bfin: handle BFIN_CPU_UNKNOWN in TARGET_CPU_CPP_BUILTINS
authorBernhard Reutner-Fischer <aldot@gcc.gnu.org>
Wed, 22 Apr 2015 08:05:20 +0000 (10:05 +0200)
committerBernhard Reutner-Fischer <aldot@gcc.gnu.org>
Wed, 22 Apr 2015 08:05:20 +0000 (10:05 +0200)
gcc/c-family/c-cppbuiltin.c
In file included from ./tm.h:21:0,
                 from
../../../../../../home/me/src/gcc-5.0.mine/gcc/c-family/c-cppbuiltin.c:23:
../../../../../../home/me/src/gcc-5.0.mine/gcc/c-family/c-cppbuiltin.c:
In function ‘void c_cpp_builtins(cpp_reader*)’:
../../../../../../home/me/src/gcc-5.0.mine/gcc/config/bfin/bfin.h:43:14:
error: enumeration value ‘BFIN_CPU_UNKNOWN’ not handled in switch
[-Werror=switch]
       switch (bfin_cpu_type)   \
              ^
../../../../../../home/me/src/gcc-5.0.mine/gcc/c-family/c-cppbuiltin.c:1243:3:
note: in expansion of macro ‘TARGET_CPU_CPP_BUILTINS’
   TARGET_CPU_CPP_BUILTINS ();
   ^
cc1plus: all warnings being treated as errors
make[2]: *** [c-family/c-cppbuiltin.o] Error 1

Maybe seeing BFIN_CPU_UNKNOWN in the cpu switch statement should
__builtin_abort() but be conservative to just allow all-gcc of config-list.mk
to compile

From-SVN: r222307

gcc/ChangeLog
gcc/config/bfin/bfin.h

index 2755252c291a2470633d2c1b38b5ae67fcfda554..2fb0dd1be183625cc0f393e93f8461c22429071f 100644 (file)
@@ -1,3 +1,7 @@
+2015-04-22  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
+
+       * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Add BFIN_CPU_UNKNOWN.
+
 2015-04-22  Hale Wang  <hale.wang@arm.com>
            Terry Guo  <terry.guo@arm.com>
 
index fd90199af6d481ec86dd1e7e6c20c61ea1a7ed81..49cc741cbec47380c70f2c3866089767ba388eca 100644 (file)
@@ -42,6 +42,8 @@
                                                \
       switch (bfin_cpu_type)                   \
        {                                       \
+       case BFIN_CPU_UNKNOWN:                  \
+         break;                                \
        case BFIN_CPU_BF512:                    \
          builtin_define ("__ADSPBF512__");     \
          builtin_define ("__ADSPBF51x__");     \