[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-patches
Subject: Re: [patch] Simplify case labels for mathematical builtins
From: Volker Reichelt <reichelt () igpm ! rwth-aachen ! de>
Date: 2005-11-30 16:42:49
Message-ID: tkrat.fbbb8fc32d55e778 () igpm ! rwth-aachen ! de
[Download RAW message or body]
On 30 Nov, Roger Sayle wrote:
> This is OK for mainline, provided that you move the definitions of
> CASE_FLT_FN and CASE_INT_FN. I don't think that builtins.def is the
> most appropriate place for them, instead I prefer to see those lines
> moved to tree.h (close to where we #include "builtins.def"). This
> should also avoid to need to #undef them first, as builtins.def may
> be included multiple times in a single source file, but tree.h will
> be included only once.
You're right, tree.h is a better place for the macro definitions,
see patch below.
I'll retest the whole patch and commit it, if testing succeeds.
Regards,
Volker
===================================================================
--- gcc/gcc/tree.h (revision 107699)
+++ gcc/gcc/tree.h (working copy)
@@ -234,6 +234,9 @@
#define BUILTIN_ROOT_P(FN) (BUILTIN_SQRT_P (FN) || BUILTIN_CBRT_P (FN))
+#define CASE_FLT_FN(FN) case FN: case FN##F: case FN##L
+#define CASE_INT_FN(FN) case FN: case FN##L: case FN##LL
+
/* An array of _DECL trees for the above. */
extern GTY(()) tree built_in_decls[(int) END_BUILTINS];
extern GTY(()) tree implicit_built_in_decls[(int) END_BUILTINS];
===================================================================
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic