On 6/19/20 3:08 AM, Kito Cheng wrote:
- g++ will complain too few arguments for frflags builtin like bellow
message:
error: too few arguments to function 'unsigned int
__builtin_riscv_frflags(void)'
- However it's no arguments needed, it because we declare the function
type with VOID arguments, that seems like require a VOID argument
in the c++ front-end when GCC tried to resolve the function.
Yes, G++ expects a parameter list to end with void_list_node
specifically, not any TREE_LIST with void_type_node.
gcc/ChangeLog
* config/riscv/riscv-builtins.c (RISCV_FTYPE_NAME0): New.
(RISCV_FTYPE_ATYPES0): New.
(riscv_builtins): Using RISCV_USI_FTYPE for frflags.
* config/riscv/riscv-ftypes.def: Remove VOID argument.
You should also be able to remove
#define RISCV_ATYPE_VOID void_type_node
OK with that change.
Jason