diff options
author | Dongkyun, Son <dongkyun.s@samsung.com> | 2016-10-28 23:12:51 +0900 |
---|---|---|
committer | Jaehun Jeong <jh4u.jeong@samsung.com> | 2016-12-22 16:35:33 +0900 |
commit | 0cd0fea365b5cd01e8e74bc55404a3c6c6dc032c (patch) | |
tree | c59f2115ad87825618c41a6b4bfb11bb119fd8b8 | |
parent | ee7b666609837673e936da3a1c7bd176bc19894e (diff) | |
download | application-sandbox/jaehun77/gcc6x.tar.gz application-sandbox/jaehun77/gcc6x.tar.bz2 application-sandbox/jaehun77/gcc6x.zip |
fix build error by Werrorsandbox/jaehun77/gcc6x
Different semantics for inline functions
While -std=gnu89 employs the GNU89 inline semantics, -std=gnu11 uses the
C99 inline semantics. The C99 inline semantics requires that if a
function with external linkage is declared with inline function
specifier, it also has to be defined in the same translation unit (TU).
Consequently, GCC now warns if it sees a TU such as the following:
inline int foo (void);
This example now gives the following diagnostic:
f.c:1:12: warning: inline function 'foo' declared but never defined
inline int foo (void);
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fed3abf..9f6c48b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ FOREACH(flag ${${fw_name}_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -Werror") ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC ") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -fgnu89-inline ") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -Werror") IF("${ARCH}" STREQUAL "arm") |