aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm@polyomino.org.uk>2004-06-06 16:21:59 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2004-06-06 16:21:59 +0100
commit10bc1b1bec937131ad05fa18184b985078b99702 (patch)
treeb8c296e8aca98162130737ac16548bd0553c78f3 /gcc/c-decl.c
parentff24b82044cde0c0ff5dd68f45bc9f2bfbcfb3cf (diff)
downloadgcc-10bc1b1bec937131ad05fa18184b985078b99702.zip
gcc-10bc1b1bec937131ad05fa18184b985078b99702.tar.gz
gcc-10bc1b1bec937131ad05fa18184b985078b99702.tar.bz2
re PR c/13519 (typeof(nonconst+const) is const)
PR c/13519 * c-typeck.c (composite_type, common_pointer_type): New functions. (common_type): Split parts into composite_type and common_pointer_type. Ensure that arithmetic operations return unqualified types without attributes. Don't make composite type of signed enum and compatible integer be unsigned. (build_conditional_expr, build_binary_op): Use common_pointer_type. * c-decl.c (merge_decls): Use composite_type. * c-tree.h (composite_type): Declare. testsuite: * gcc.c-torture/enum-3.c, gcc.dg/pr13519-1.c: New tests. From-SVN: r82671
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 3a13664..ee09afa 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1452,7 +1452,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
/* Merge the data types specified in the two decls. */
TREE_TYPE (newdecl)
= TREE_TYPE (olddecl)
- = common_type (newtype, oldtype);
+ = composite_type (newtype, oldtype);
/* Lay the type out, unless already done. */
if (oldtype != TREE_TYPE (newdecl))