Commit 744aa42f by Ian Lance Taylor Committed by Ian Lance Taylor

targhooks.c (default_builtin_vectorized_function): Change fn parameter to unsigned int.

./:	* targhooks.c (default_builtin_vectorized_function): Change fn
	parameter to unsigned int.
	(default_builtin_vectorized_conversion): Change code parameter to
	unsigned int.
	(default_builtin_reciprocal): Change fn parameter to unsigned int.
	* targhooks.h: Update declarations.
	* config/rs6000/rs6000.c (rs6000_builtin_conversion): Change code
	parameter to unsigned int.

	* c-typeck.c (comptypes_check_enum_int): New static function.
	(comptypes_internal): Add enum_and_int_p parameter.  Change all
	callers.
	(comp_target_types): Add location parameter.  Change all callers.
	(tagged_types_tu_compatible_p): Add enum_and_int_p parameter.
	Change all callers.
	(function_types_compatible_p, type_lists_compatible_p): Likewise.
	(build_conditional_expr): Add colon_loc parameter.  Change all
	callers.
	(convert_for_assignment): Add location parameter.  Change all
	callers.
	* c-parser.c (c_parser_conditional_expression): Pass location of
	colon to build_conditional_expr.
	* c-tree.h (build_conditional_expr): Update declaration.
objc/:
	* objc-act.c (objc_gimplify_expr): Change return type to int.
	* objc-act.h: Update declaration.
testsuite/:
	* gcc.dg/Wcxx-compat-12.c: New testcase.

From-SVN: r148325
parent a3f2b833
2009-06-09 Ian Lance Taylor <iant@google.com>
* targhooks.c (default_builtin_vectorized_function): Change fn
parameter to unsigned int.
(default_builtin_vectorized_conversion): Change code parameter to
unsigned int.
(default_builtin_reciprocal): Change fn parameter to unsigned int.
* targhooks.h: Update declarations.
* config/rs6000/rs6000.c (rs6000_builtin_conversion): Change code
parameter to unsigned int.
* c-typeck.c (comptypes_check_enum_int): New static function.
(comptypes_internal): Add enum_and_int_p parameter. Change all
callers.
(comp_target_types): Add location parameter. Change all callers.
(tagged_types_tu_compatible_p): Add enum_and_int_p parameter.
Change all callers.
(function_types_compatible_p, type_lists_compatible_p): Likewise.
(build_conditional_expr): Add colon_loc parameter. Change all
callers.
(convert_for_assignment): Add location parameter. Change all
callers.
* c-parser.c (c_parser_conditional_expression): Pass location of
colon to build_conditional_expr.
* c-tree.h (build_conditional_expr): Update declaration.
2009-06-09 Sebastian Pop <sebastian.pop@amd.com>
* graphite.c: Revert previous patch.
......
......@@ -4503,7 +4503,7 @@ static struct c_expr
c_parser_conditional_expression (c_parser *parser, struct c_expr *after)
{
struct c_expr cond, exp1, exp2, ret;
location_t cond_loc;
location_t cond_loc, colon_loc;
gcc_assert (!after || c_dialect_objc ());
......@@ -4542,6 +4542,8 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after)
skip_evaluation += ((cond.value == truthvalue_true_node)
- (cond.value == truthvalue_false_node));
}
colon_loc = c_parser_peek_token (parser)->location;
if (!c_parser_require (parser, CPP_COLON, "expected %<:%>"))
{
skip_evaluation -= cond.value == truthvalue_true_node;
......@@ -4553,7 +4555,7 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after)
exp2 = c_parser_conditional_expression (parser, NULL);
exp2 = default_function_array_conversion (exp2);
skip_evaluation -= cond.value == truthvalue_true_node;
ret.value = build_conditional_expr (cond.value,
ret.value = build_conditional_expr (colon_loc, cond.value,
cond.original_code == C_MAYBE_CONST_EXPR,
exp1.value, exp2.value);
ret.original_code = ERROR_MARK;
......
......@@ -607,7 +607,7 @@ extern struct c_expr parser_build_unary_op (enum tree_code, struct c_expr,
extern struct c_expr parser_build_binary_op (location_t,
enum tree_code, struct c_expr,
struct c_expr);
extern tree build_conditional_expr (tree, bool, tree, tree);
extern tree build_conditional_expr (location_t, tree, bool, tree, tree);
extern tree build_compound_expr (tree, tree);
extern tree c_cast_expr (struct c_type_name *, tree, location_t);
extern tree build_c_cast (tree, tree);
......
......@@ -858,7 +858,7 @@ static tree rs6000_builtin_reciprocal (unsigned int, bool, bool);
static tree rs6000_builtin_mask_for_load (void);
static tree rs6000_builtin_mul_widen_even (tree);
static tree rs6000_builtin_mul_widen_odd (tree);
static tree rs6000_builtin_conversion (enum tree_code, tree);
static tree rs6000_builtin_conversion (unsigned int, tree);
static tree rs6000_builtin_vec_perm (tree, tree *);
static void def_builtin (int, const char *, tree, int);
......@@ -2013,8 +2013,10 @@ rs6000_builtin_mask_for_load (void)
side of the conversion.
Return NULL_TREE if it is not available. */
static tree
rs6000_builtin_conversion (enum tree_code code, tree type)
rs6000_builtin_conversion (unsigned int tcode, tree type)
{
enum tree_code code = (enum tree_code) tcode;
if (!TARGET_ALTIVEC)
return NULL_TREE;
......
2009-06-09 Ian Lance Taylor <iant@google.com>
* objc-act.c (objc_gimplify_expr): Change return type to int.
* objc-act.h: Update declaration.
2009-06-08 Alexandre Oliva <aoliva@redhat.com>
* objc-act.c (objc_init): Skip print_struct_values during
......
......@@ -9532,7 +9532,7 @@ objc_rewrite_function_call (tree function, tree first_param)
a function in OBJ_TYPE_REF_EXPR (presumably objc_msgSend or one
of its cousins). */
enum gimplify_status
int
objc_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
{
enum gimplify_status r0, r1;
......
/* Declarations for objc-act.c.
Copyright (C) 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
Copyright (C) 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -31,7 +31,7 @@ bool objc_init (void);
const char *objc_printable_name (tree, int);
void objc_finish_file (void);
tree objc_fold_obj_type_ref (tree, tree);
enum gimplify_status objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
int objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
/* NB: The remaining public functions are prototyped in c-common.h, for the
benefit of stub-objc.c and objc-act.c. */
......
......@@ -398,7 +398,7 @@ default_invalid_within_doloop (const_rtx insn)
/* Mapping of builtin functions to vectorized variants. */
tree
default_builtin_vectorized_function (enum built_in_function fn ATTRIBUTE_UNUSED,
default_builtin_vectorized_function (unsigned int fn ATTRIBUTE_UNUSED,
tree type_out ATTRIBUTE_UNUSED,
tree type_in ATTRIBUTE_UNUSED)
{
......@@ -408,7 +408,7 @@ default_builtin_vectorized_function (enum built_in_function fn ATTRIBUTE_UNUSED,
/* Vectorized conversion. */
tree
default_builtin_vectorized_conversion (enum tree_code code ATTRIBUTE_UNUSED,
default_builtin_vectorized_conversion (unsigned int code ATTRIBUTE_UNUSED,
tree type ATTRIBUTE_UNUSED)
{
return NULL_TREE;
......@@ -417,7 +417,7 @@ default_builtin_vectorized_conversion (enum tree_code code ATTRIBUTE_UNUSED,
/* Reciprocal. */
tree
default_builtin_reciprocal (enum built_in_function fn ATTRIBUTE_UNUSED,
default_builtin_reciprocal (unsigned int fn ATTRIBUTE_UNUSED,
bool md_fn ATTRIBUTE_UNUSED,
bool sqrt ATTRIBUTE_UNUSED)
{
......
......@@ -66,12 +66,11 @@ extern bool default_fixed_point_supported_p (void);
extern const char * default_invalid_within_doloop (const_rtx);
extern tree default_builtin_vectorized_function
(enum built_in_function, tree, tree);
extern tree default_builtin_vectorized_function (unsigned int, tree, tree);
extern tree default_builtin_vectorized_conversion (enum tree_code, tree);
extern tree default_builtin_vectorized_conversion (unsigned int, tree);
extern tree default_builtin_reciprocal (enum built_in_function, bool, bool);
extern tree default_builtin_reciprocal (unsigned int, bool, bool);
extern bool default_builtin_vector_alignment_reachable (const_tree, bool);
......
2009-06-09 Ian Lance Taylor <iant@google.com>
* gcc.dg/Wcxx-compat-12.c: New testcase.
2009-06-09 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/40334
......
/* { dg-do compile } */
/* { dg-options "-Wc++-compat" } */
enum E { A };
enum E v;
unsigned int *p = &v; /* { dg-warning "incompatible in C\[+\]\[+\]" } */
void foo(unsigned int);
void (*pfn)(enum E) = &foo; /* { dg-warning "incompatible in C\[+\]\[+\]" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment