This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
gcc/gcc ChangeLog c-common.c c-decl.c c-typeck ...
- From: jsm28 at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: 29 Jan 2005 16:12:46 -0000
- Subject: gcc/gcc ChangeLog c-common.c c-decl.c c-typeck ...
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jsm28@gcc.gnu.org 2005-01-29 16:12:45
Modified files:
gcc : ChangeLog c-common.c c-decl.c c-typeck.c
gcc/testsuite : ChangeLog
gcc/testsuite/gcc.dg: concat.c
Added files:
gcc/testsuite/gcc.dg: Wwrite-strings-1.c array-quals-2.c
lvalue-3.c
Log message:
* c-common.c (fix_string_type): Just use c_build_qualified_type to
build string type.
(c_build_qualified_type): Build qualified array types with
TYPE_MAIN_VARIANT pointing to corresponding unqualified type.
* c-decl.c (c_make_fname_decl): Build unqualified array type
before qualified type.
(grokdeclarator): Use TYPE_MAIN_VARIANT of typedef type if element
type is qualified, not just if type itself is. Don't apply
qualifiers to array type when declarator is processed. Apply
qualifiers to field type whether or not it is an array type.
Don't handle array types specially for applying qualifiers to
variables.
* c-typeck.c (composite_type): Build unqualified element type and
array type when forming composite of array types.
(common_pointer_type, comptypes, comp_target_types,
type_lists_compatible_p, build_indirect_ref, build_array_ref,
convert_for_assignment): Don't apply TYPE_MAIN_VARIANT to array
types.
(type_lists_compatible_p): Cache TREE_VALUE (args1) and TREE_VALUE
(args2) in variables a1 and a2.
testsuite:
* gcc.dg/Wwrite-strings-1.c, gcc.dg/array-quals-2.c,
gcc.dg/lvalue-3.c: New tests.
* gcc.dg/concat.c: Update expected messages.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7323&r2=2.7324
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&r1=1.601&r2=1.602
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.627&r2=1.628
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.414&r2=1.415
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4955&r2=1.4956
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/Wwrite-strings-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/array-quals-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/lvalue-3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/concat.c.diff?cvsroot=gcc&r1=1.4&r2=1.5