OSDN Git Service

PR c/13519
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 6 Jun 2004 15:21:59 +0000 (15:21 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 6 Jun 2004 15:21:59 +0000 (15:21 +0000)
commit1ea7fa601eb0c73e47f13a8b1bf16975123a8050
treeb8c296e8aca98162130737ac16548bd0553c78f3
parente7917d1d4f1bb33d0cac6c26793e52d87f468032
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82671 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-decl.c
gcc/c-tree.h
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/enum-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr13519-1.c [new file with mode: 0644]