hello, this is moonseop.kim.
now, i got some weird compile fail error message during compiling Qualcomm SLPI block with Window Hexagon ver 8.3.06.
error message is like that,
: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
*val = (*val << 8) | (*val >> 8);
^
: error: incompatible integer to pointer conversion initializing 'int *' with an expression of type 'int' [-Werror,-Wint-conversion]
*val = (*val << 8) | (*val >> 8);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
: error: variable 'val' is uninitialized when used within its own initialization [-Werror,-Wuninitialized]
*val = (*val << 8) | (*val >> 8);
~~~ ^~~
: error: variable 'val' is uninitialized when used within its own initialization [-Werror,-Wuninitialized]
*val = (*val << 8) | (*val >> 8);
~~~ ^~~
: error: initializer element is not a compile-time constant
*val = (*val << 8) | (*val >> 8);
^~~~~~~~~~~~~~~~~~~~~~~~~
: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
*val = (*val << 8) | ((*val >> 8) & 0xFF);
^
: error: redefinition of 'val'
: note: previous definition is here
*val = (*val << 8) | (*val >> 8);
^
: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
*val = ((*val << 8) & 0xFF00FF00) | ((*val >> 8) & 0xFF00FF); \
^
: error: redefinition of 'val'
: note: previous definition is here
*val = (*val << 8) | (*val >> 8);
^
: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
*val = (*val << 16) | (*val >> 16); \
^
: error: redefinition of 'val'
: note: previous definition is here
*val = (*val << 8) | (*val >> 8);
^
: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
*val = ((*val << 8) & 0xFF00FF00) | ((*val >> 8) & 0xFF00FF); \
^
:103:3: error: redefinition of 'val'
: note: previous definition is here
*val = (*val << 8) | (*val >> 8);
^
:105:3: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
*val = (*val << 16) | ((*val >> 16) & 0xFFFF); \
^
:105:3: error: redefinition of 'val'
:83:3: note: previous definition is here
*val = (*val << 8) | (*val >> 8);
^
15 errors generated.=== Compiling
and, source code is like that,
#define swap_uint16(val) \
line 83 : *val = (*val << 8) | (*val >> 8);
#define swap_int16(val) \
*val = (*val << 8) | ((*val >> 8) & 0xFF);
#define swap_uint32(val) \
*val = ((*val << 8) & 0xFF00FF00) | ((*val >> 8) & 0xFF00FF); \
*val = (*val << 16) | (*val >> 16); \
#define swap_int32(val) \
line 103 : *val = ((*val << 8) & 0xFF00FF00) | ((*val >> 8) & 0xFF00FF); \
line 105 : *val = (*val << 16) | ((*val >> 16) & 0xFFFF); \
it looks like so weird issue, because it's a source which is compiling well on linux hexagon environment without any error message.
and they told me that i have to set argument's type at MACRO function's argument.
i can check this kinds of error message only window hexagon build environment.
if you can check this hexagon issue, please let me share the result of your analysis.
thanks.