------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-02-21 23:12 ------- Subject: Bug 19076
CVSROOT: /cvs/gcc Module name: gcc Changes by: [EMAIL PROTECTED] 2005-02-21 23:12:28 Modified files: gcc/cp : ChangeLog cp-tree.h decl.c decl2.c error.c pt.c tree.c typeck.c Log message: 2005-02-21 Douglas Gregor <[EMAIL PROTECTED]> PR c++/19076 PR c++/6628 * cp-tree.h (cp_apply_type_quals_to_decl): Declared. * decl.c (grokdeclarator): Pedwarn about qualifying a function type. Add qualifiers when declaring a typedef of a function type. Member function pointers pick up the qualifiers of the typedef used to declare them. Don't complain about creating cv-qualified function types. Complain about qualified function typedefs that are used to declare non-static member functions or free functions. Use cp_apply_type_quals_to_decl. (start_preparsed_function): Use cp_apply_type_quals_to_decl. (grokclassfn): Use cp_apply_type_quals_to_decl. * error.c (dump_type_suffix): Print qualifiers for function types. * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl. (tsubst): When substituting a function type into a member pointer type, pass along the qualifiers. (unify): Unify member pointers to member function pointers. * tree.c (cp_build_qualified_type_real): Function types may be qualified. This includes restrict qualifiers. * typeck.c (cp_apply_type_quals_to_decl): New function to replace use of c_apply_type_quals_to_decl. Drops qualifiers that are being added to function types. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4639&r2=1.4640 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1104&r2=1.1105 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1366&r2=1.1367 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&r1=1.767&r2=1.768 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&r1=1.275&r2=1.276 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.977&r2=1.978 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&r1=1.426&r2=1.427 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.614&r2=1.615 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19076