This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] gcc/config/c6x/c6x.h: Handle default case for switch statement in TARGET_CPU_CPP_BUILTINS().


The related warning:

  g++ -c  -DIN_GCC_FRONTEND -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -Ic-family -I../../gcc-c6x/gcc -I../../gcc-c6x/gcc/c-family -I../../gcc-c6x/gcc/../include -I../../gcc-c6x/gcc/../libcpp/include  -I../../gcc-c6x/gcc/../libdecnumber -I../../gcc-c6x/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-c6x/gcc/../libbacktrace   -o c-family/c-cppbuiltin.o -MT c-family/c-cppbuiltin.o -MMD -MP -MF c-family/.deps/c-cppbuiltin.TPo ../../gcc-c6x/gcc/c-family/c-cppbuiltin.c
  In file included from ./tm.h:16:0,
                   from ../../gcc-c6x/gcc/c-family/c-cppbuiltin.c:23:
  ../../gcc-c6x/gcc/c-family/c-cppbuiltin.c: In function âvoid c_cpp_builtins(cpp_reader*)â:
  ../../gcc-c6x/gcc/config/c6x/c6x.h:85:14: warning: enumeration value âunk_isaâ not handled in switch [-Wswitch]
         switch (c6x_arch)    \
                ^../../gcc-c6x/gcc/c-family/c-cppbuiltin.c:1243:3: note: in expansion of macro âTARGET_CPU_CPP_BUILTINSâ
     TARGET_CPU_CPP_BUILTINS ();
     ^

2015-03-28  Chen Gang  <gang.chen.5i5j@gmail.com>

	* config/c6x/c6x.h (TARGET_CPU_CPP_BUILTINS): Handle default
	case for switch statement.
---
 gcc/config/c6x/c6x.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/config/c6x/c6x.h b/gcc/config/c6x/c6x.h
index 58a7ac6..b4810be 100644
--- a/gcc/config/c6x/c6x.h
+++ b/gcc/config/c6x/c6x.h
@@ -109,6 +109,9 @@ extern c6x_cpu_t c6x_arch;
 	  builtin_define ("_TMS320C6400_PLUS");	\
 	  builtin_define ("_TMS320C6400");	\
 	  break;				\
+						\
+	default:				\
+	  break;				\
 	}					\
     } while (0)
 
-- 
1.9.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]