I have some code that I am compiling for an embedded platform. When I attempt to run a Clang-based tool against the code I get some errors.
I have narrowed down the code that generates the errors to the following:
typedef int _GCC_ATTR_ALIGN_8t __attribute__((__mode__(__QI__)));
typedef _GCC_ATTR_ALIGN_8t _Int8t __attribute__((__aligned__(1)));
typedef _Int8t _Intleast8t;
typedef _Int8t _Intfast8t;
typedef _Int8t _int8;
typedef _Int8t int8_t;
The output from running clang 3.8.0 against the code is:
x.cpp:5:16: error: cannot combine with previous 'type-name' declaration
specifier
typedef _Int8t _int8;
^
x.cpp:5:1: warning: typedef requires a name [-Wmissing-declarations]
typedef _Int8t _int8;
^~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
Why does it have the issue only on the _int8 typedef and not the other typedefs? Also, what does the error mean?