[trunk] patch to clean up handling of pure and constant functions.
Kenneth Zadeck
zadeck@naturalbridge.com
Thu May 8 11:58:00 GMT 2008
Andreas Schwab wrote:
> Andreas Schwab <schwab@suse.de> writes:
>
>
>> Kenneth Zadeck <zadeck@naturalbridge.com> writes:
>>
>>
>>> All changes done as you requested. Committed as revision 135053 after
>>> retesting on x86-{64,32}.
>>>
>> ../../gcc/ada/utils.c: In function 'init_gigi_decls':
>> ../../gcc/ada/utils.c:638: warning: implicit declaration of function 'DECL_IS_PURE'
>> ../../gcc/ada/utils.c:638: error: invalid lvalue in assignment
>> ../../gcc/ada/utils.c:656: error: invalid lvalue in assignment
>> ../../gcc/ada/utils.c: In function 'handle_pure_attribute':
>> ../../gcc/ada/utils.c:4470: error: invalid lvalue in assignment
>> make[3]: *** [ada/utils.o] Error 1
>>
>
> Regtested on ia64-suse-linux and checked in as obvious.
>
> Andreas.
>
> 2008-05-08 Andreas Schwab <schwab@suse.de>
>
> * utils.c (handle_pure_attribute, init_gigi_decls): Rename
> DECL_IS_PURE to DECL_PURE_P.
>
> Index: ada/utils.c
> ===================================================================
> --- ada/utils.c (revision 135077)
> +++ ada/utils.c (working copy)
> @@ -635,7 +635,7 @@ init_gigi_decls (tree long_long_float_ty
> NULL_TREE, build_function_type (jmpbuf_ptr_type, NULL_TREE),
> NULL_TREE, false, true, true, NULL, Empty);
> /* Avoid creating superfluous edges to __builtin_setjmp receivers. */
> - DECL_IS_PURE (get_jmpbuf_decl) = 1;
> + DECL_PURE_P (get_jmpbuf_decl) = 1;
>
> set_jmpbuf_decl
> = create_subprog_decl
> @@ -653,7 +653,7 @@ init_gigi_decls (tree long_long_float_ty
> build_function_type (build_pointer_type (except_type_node), NULL_TREE),
> NULL_TREE, false, true, true, NULL, Empty);
> /* Avoid creating superfluous edges to __builtin_setjmp receivers. */
> - DECL_IS_PURE (get_excptr_decl) = 1;
> + DECL_PURE_P (get_excptr_decl) = 1;
>
> /* Functions that raise exceptions. */
> raise_nodefer_decl
> @@ -4467,7 +4467,7 @@ handle_pure_attribute (tree *node, tree
> int ARG_UNUSED (flags), bool *no_add_attrs)
> {
> if (TREE_CODE (*node) == FUNCTION_DECL)
> - DECL_IS_PURE (*node) = 1;
> + DECL_PURE_P (*node) = 1;
> /* ??? TODO: Support types. */
> else
> {
>
>
sorry, i seem to have missed that in the greps.
thanks
kenny
More information about the Gcc-patches
mailing list