Re: [PATCH] RISC-V: Fix compilation failed for frflags builtin in C++ mode

2020-06-21 Thread Kito Cheng via Gcc-patches
Hi Jason: Committed, thanks for your review :) > You should also be able to remove > > > #define RISCV_ATYPE_VOID void_type_node That's still used for builtin functions without return value :)

Re: [PATCH] RISC-V: Fix compilation failed for frflags builtin in C++ mode

2020-06-19 Thread Jason Merrill via Gcc-patches
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 typ

Re: [PATCH] RISC-V: Fix compilation failed for frflags builtin in C++ mode

2020-06-19 Thread Kito Cheng via Gcc-patches
,7 @@ > +/* { dg-options "-O2 -march=rv32if" } */ > +/* { dg-do compile } */ > + > +int f() > +{ > + return __builtin_riscv_frflags(); > +} > -- > 2.27.0 > From 6a84ffed89eb8c2a42ccbc29b93df996d0e5d6c9 Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Fri, 19

[PATCH] RISC-V: Fix compilation failed for frflags builtin in C++ mode

2020-06-19 Thread Kito Cheng
- 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 requir