This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Avoid virtual operands for trigonometric builtins
On Wed, 9 Mar 2005, Zdenek Dvorak wrote:
> + { "no vops", 0, 0, true, false, false,
> + handle_novops_attribute },
A comment here along the lines of "This attribute is only for the use of
built-in functions and so has a name which cannot be specified in source
code." might be a good idea.
> + /* Handle a "novops" attribute; arguments as in
> + struct attribute_spec.handler. */
This comment needs updating for the new name.
> + static tree
> + handle_novops_attribute (tree *node, tree name, tree ARG_UNUSED (args),
> + int ARG_UNUSED (flags), bool *no_add_attrs)
> + {
> + if (TREE_CODE (*node) == FUNCTION_DECL)
> + DECL_IS_NOVOPS (*node) = 1;
> + else
> + {
> + warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
> + *no_add_attrs = true;
Since it is now purely internal, you can assert that the node is a
FUNCTION_DECL instead of warning if it isn't.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)