gcc/libstdc++-v3
Dodji Seketeli d0940d5662 re PR c++/26693 (Access checks not performed for types in templates)
gcc/ChangeLog:
2009-04-02  Dodji Seketeli  <dodji@redhat.com>

    PR c++/26693
    * c-decl.c: (clone_underlying_type): Move this ...
    * c-common.c (set_underlying_type): ... here.
    Also, make sure the function properly sets TYPE_STUB_DECL() on
    the newly created typedef variant type.
    * c-common.h (is_typedef_decl, set_underlying_type): Declare ...
    * c-common.c (is_typedef_decl, set_underlying_type): ... new entry points.

gcc/cp/ChangeLog:
2009-04-02  Dodji Seketeli  <dodji@redhat.com>

    PR c++/26693
    * decl2.c (grokfield): when a typedef appears in a
    class, create the typedef variant type node for it.
    (save_template_attributes): Creating typedef variant type node
     here is now useless.
    * decl.c (grokdeclarator): If the typedef'ed struct/class was
    anonymous, set the proper type name to all its type variants.
    (xref_basetypes) : Fixup the variant types after setting
    TYPE_BINFO on REF.
    * name-lookup.c (pushdecl_maybe_friend): Reuse the
    set_underlying_type function to install typedef variant types.
    * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
    macro.
    (append_type_to_template_for_access_check): New entry points.
    * semantics.c (check_accessibility_of_qualified_id):
    When a typedef that is a member of a class appears in a template,
    add it to the template. It will be ...
    * class.c (finish_struct_bits): Split type variant fixup into ...
    (fixup_type_variants): A new entry point.
    * pt.c (instantiate_class_template, instantiate_template ): ... access
    checked at template instantiation time.
    (resolve_type_name_type): The type name should be the name of the
    main type variant.
    (retrieve_specialization): Specializations of template typedefs aren't
    to be looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
    (append_type_to_template_for_access_check): New entry point.
    (tsubst_decl): For typedefs, build the variant type from the correct
    original type.
    (get_class_bindings): Fix function comment.
    (perform_typedefs_access_check): New entry point.

gcc/testsuite/ChangeLog:
2009-04-02  Dodji Seketeli  <dodji@redhat.com>

    PR c++/26693
    * g++.dg/template/typedef11.C: New test.
    * g++.dg/template/typedef12.C: Likewise.
    * g++.dg/template/typedef13.C: Likewise.
    * g++.dg/template/typedef14.C: Likewise.
    * g++.dg/template/typedef15.C: Likewise.
    * g++.dg/template/typedef16.C: Likewise.
    * g++.dg/template/sfinae3.C: Compile this pedantically.
    The only errors expected should be the one saying the typedef is ill
    formed.
    * g++.old-deja/g++.pt/typename8.C: Likewise.
    * g++.dg/template/access11.C: Update this.

libstdc++-v3/ChangeLog:
2009-04-02  Dodji Seketeli  <dodji@redhat.com>

    * include/ext/bitmap_allocator.h: the typedefs should be made public
    if we want them to be accessible. This has been revealed by the patch
    that fixes PR c++/26693 in g++.

From-SVN: r145440
2009-04-02 11:24:19 +02:00
..
config baseline_symbols.txt: Regenerated. 2009-04-02 08:50:55 +02:00
doc appendix_contributing.xml: Add docbook style sheet version information. 2009-03-17 22:09:26 +00:00
include re PR c++/26693 (Access checks not performed for types in templates) 2009-04-02 11:24:19 +02:00
libsupc++ re PR c++/34691 (Default argument checking not performed after overload resolution with C linkage) 2009-03-31 23:34:30 -04:00
po re PR libstdc++/32666 (FAIL: abi_check hppa) 2009-01-15 20:02:11 +00:00
scripts doxygroups.cc: Move algorithm groups into algorithmfwd.h. 2009-02-19 08:15:15 +00:00
src system_error (system_category): To system_category(). 2009-02-18 07:35:36 +00:00
testsuite [multiple changes] 2009-03-25 23:37:53 +00:00
ChangeLog re PR c++/26693 (Access checks not performed for types in templates) 2009-04-02 11:24:19 +02:00
ChangeLog-1998 Move entries for 1998 and 1999 out of ChangeLog-2000 and into new 2005-05-24 23:20:39 +00:00
ChangeLog-1999 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog-2000 Move entries for 1998 and 1999 out of ChangeLog-2000 and into new 2005-05-24 23:20:39 +00:00
ChangeLog-2001 c_locale_gnu.cc: Same errno fixes as generic. 2002-01-31 02:05:17 +00:00
ChangeLog-2002 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog-2003 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog-2004 1.cc: Fix, null-terminate array1 at the outset. 2005-01-01 21:03:33 +00:00
ChangeLog-2005 2006-01-22 Paolo Carlini <pcarlini@suse.de> 2006-01-22 10:11:08 +00:00
ChangeLog-2006 re PR libstdc++/30365 (No possibility to disable large file support (LFS)) 2007-01-06 22:38:07 +00:00
ChangeLog-2007 2008-01-02 Paolo Carlini <pcarlini@suse.de> 2008-01-02 15:11:59 +00:00
Makefile.am re PR libstdc++/32666 (FAIL: abi_check hppa) 2009-01-15 20:02:11 +00:00
Makefile.in re PR libstdc++/32666 (FAIL: abi_check hppa) 2009-01-15 20:02:11 +00:00
README mainpage.html: Add in corrected links. 2008-02-12 02:10:57 +00:00
acinclude.m4 abi.exp: Add multilib support. 2009-02-23 20:42:53 +00:00
aclocal.m4 configure: Regenerate for new libtool. 2008-09-26 16:32:26 +00:00
config.h.in re PR libstdc++/32666 (FAIL: abi_check hppa) 2009-01-15 20:02:11 +00:00
configure backport: Support GNU/kOpenSolaris. 2009-03-01 17:49:31 +00:00
configure.ac re PR libstdc++/32666 (FAIL: abi_check hppa) 2009-01-15 20:02:11 +00:00
configure.host configure.host: Set abi_baseline_pair for mips64*-linux. 2009-02-09 20:24:08 +00:00
crossconfig.m4 re PR libstdc++/38919 (math_stubs_long_double.cc: error: redefinition of 'long double ...' vs. /usr/x86_64-mingw32/include/math.h) 2009-01-20 19:30:51 +00:00
fragment.am re PR libstdc++/32666 (FAIL: abi_check hppa) 2009-01-15 20:02:11 +00:00
linkage.m4 re PR libstdc++/32666 (FAIL: abi_check hppa) 2009-01-15 20:02:11 +00:00

README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.