This patch is needed in the pph branch because streamers need access to the fields in struct language_function without going through cp_function_chain.
Since these fields are named exactly like their #define counterparts, we cannot reference them without the pre-processor expanding the #defines, which causes build errors. OK for trunk? Tested on x86_64. Diego. * cp-tree.h (struct language_function): Rename returns_value to x_returns_value. Rename returns_null to x_returns_null. Rename returns_abnormally to x_returns_abnormally. Rename in_function_try_handler to x_in_function_try_handler. Rename in_base_initializer to x_in_base_initializer. Update all users. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index b53accf..a163cd2 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1050,11 +1050,11 @@ struct GTY(()) language_function { tree x_vtt_parm; tree x_return_value; - BOOL_BITFIELD returns_value : 1; - BOOL_BITFIELD returns_null : 1; - BOOL_BITFIELD returns_abnormally : 1; - BOOL_BITFIELD in_function_try_handler : 1; - BOOL_BITFIELD in_base_initializer : 1; + BOOL_BITFIELD x_returns_value : 1; + BOOL_BITFIELD x_returns_null : 1; + BOOL_BITFIELD x_returns_abnormally : 1; + BOOL_BITFIELD x_in_function_try_handler : 1; + BOOL_BITFIELD x_in_base_initializer : 1; /* True if this function can throw an exception. */ BOOL_BITFIELD can_throw : 1; @@ -1107,23 +1107,23 @@ struct GTY(()) language_function { /* Set to 0 at beginning of a function definition, set to 1 if a return statement that specifies a return value is seen. */ -#define current_function_returns_value cp_function_chain->returns_value +#define current_function_returns_value cp_function_chain->x_returns_value /* Set to 0 at beginning of a function definition, set to 1 if a return statement with no argument is seen. */ -#define current_function_returns_null cp_function_chain->returns_null +#define current_function_returns_null cp_function_chain->x_returns_null /* Set to 0 at beginning of a function definition, set to 1 if a call to a noreturn function is seen. */ #define current_function_returns_abnormally \ - cp_function_chain->returns_abnormally + cp_function_chain->x_returns_abnormally /* Nonzero if we are processing a base initializer. Zero elsewhere. */ -#define in_base_initializer cp_function_chain->in_base_initializer +#define in_base_initializer cp_function_chain->x_in_base_initializer -#define in_function_try_handler cp_function_chain->in_function_try_handler +#define in_function_try_handler cp_function_chain->x_in_function_try_handler /* Expression always returned from function, or error_mark_node otherwise, for use by the automatic named return value optimization. */ -- This patch is available for review at http://codereview.appspot.com/5229058