diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2020-06-22 20:15:36 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2020-06-22 20:15:36 +0100 |
commit | 20a2e6afa82c165bcd1a8749478e9402a25088a4 (patch) | |
tree | c62a0c81382dfc4f59d1cfe3f00c0a0cec06a0e5 /gcc/recog.h | |
parent | 99abb146fd0923ebda2c7e7681adb18e6798a90c (diff) | |
download | gcc-20a2e6afa82c165bcd1a8749478e9402a25088a4.zip gcc-20a2e6afa82c165bcd1a8749478e9402a25088a4.tar.gz gcc-20a2e6afa82c165bcd1a8749478e9402a25088a4.tar.bz2 |
recog: Restore builds with Clang
Using parameter packs with function typedefs tripped a Clang bug
in which the packs were not being expanded correctly:
https://bugs.llvm.org/show_bug.cgi?id=46377
Work around that by going back to the decltype approach, but adding
a cast to void to suppress a warning about unused values.
2020-06-22 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* coretypes.h (first_type): Delete.
* recog.h (insn_gen_fn::operator()): Go back to using a decltype.
Diffstat (limited to 'gcc/recog.h')
-rw-r--r-- | gcc/recog.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/recog.h b/gcc/recog.h index d674d38..3e4b55b 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -297,7 +297,7 @@ struct insn_gen_fn template<typename ...Ts> rtx_insn *operator() (Ts... args) const { - typedef rtx_insn *(*funcptr) (first_type<rtx, Ts>...); + typedef rtx_insn *(*funcptr) (decltype ((void) args, NULL_RTX)...); return ((funcptr) func) (args...); } |