@@ -95,6 +95,7 @@ typedef struct Member Member;
9595typedef struct Relocation Relocation ;
9696typedef struct LocalLabel LocalLabel ;
9797typedef struct EnumVal EnumVal ;
98+ typedef union FPVal FPVal ;
9899typedef struct AsmContext AsmContext ;
99100typedef struct FuncObj FuncObj ;
100101
@@ -647,6 +648,10 @@ Obj *parse(Token *tok);
647648Token * skip_paren (Token * tok );
648649Obj * new_lvar (Type * ty );
649650bool is_const_var (Obj * var );
651+ bool is_const_expr (Node * node , int64_t * val );
652+ bool is_const_fp (Node * node , FPVal * fval );
653+ bool is_const_zero_bitint (Node * node );
654+ Obj * eval_var_opt (Node * node , int * ofs , bool let_array , bool let_atomic );
650655bool equal_tok (Token * a , Token * b );
651656char * new_unique_name (void );
652657Obj * get_symbol_var (char * );
@@ -695,13 +700,13 @@ struct EnumVal {
695700 int64_t val ;
696701};
697702
698- typedef union {
703+ union FPVal {
699704 uint64_t chunk [2 ];
700705 uint32_t chunk32 [4 ];
701706 long_double_t ld ;
702707 double d ;
703708 float f ;
704- } FPVal ;
709+ };
705710
706711typedef enum {
707712 TY_VOID ,
@@ -845,8 +850,6 @@ bool is_redundant_cast(Node *expr, Type *ty);
845850bool is_compatible (Type * t1 , Type * t2 );
846851bool is_compatible2 (Type * t1 , Type * t2 );
847852bool is_record_compat (Type * t1 , Type * t2 );
848- bool is_const_expr (Node * node , int64_t * val );
849- bool is_const_fp (Node * node , FPVal * fval );
850853bool is_nullptr (Node * node );
851854bool is_ptr (Type * ty );
852855int next_pow_of_two (int val );
@@ -870,7 +873,6 @@ Type *new_derived_type(Type *newty, QualMask qual, Type *ty, Token *tok);
870873Type * aligned_type (int align , Type * ty );
871874Type * qual_type (QualMask msk , Type * ty , Token * tok );
872875void cvqual_type (Type * * ty_p , Type * ty2 );
873- Obj * eval_var_opt (Node * node , int * ofs , bool let_array , bool let_atomic );
874876bool mem_iter (Member * * mem );
875877Node * assign_cast (Type * to , Node * expr );
876878
0 commit comments