Forums - window Hexagon bug

1 post / 0 new
window Hexagon bug
moonseop.kim
Join Date: 20 Aug 19
Posts: 1
Posted: Tue, 2019-08-20 02:15

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.

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.