aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2020-05-01 16:18:19 -0400
committerPatrick Palka <ppalka@redhat.com>2020-05-01 16:37:57 -0400
commit4f6c1ca287d2c64856ef67fa50bc462633d5b8cf (patch)
tree24cfe5a8dd12327815e4d4e7566b6e0b7d2dcd9c /gcc/cfgexpand.c
parent30da2906ac521749aef8260fc1d942e62073f19d (diff)
downloadgcc-4f6c1ca287d2c64856ef67fa50bc462633d5b8cf.zip
gcc-4f6c1ca287d2c64856ef67fa50bc462633d5b8cf.tar.gz
gcc-4f6c1ca287d2c64856ef67fa50bc462633d5b8cf.tar.bz2
c++: Missing SFINAE with inaccessible static data member [PR90880]
This is a missing SFINAE issue when verifying the accessibility of a static data member. The cause is that check_accessibility_of_qualified_id unconditionally passes tf_warning_or_error to perform_or_defer_access_check, even when called from tsubst_qualified_id(..., complain=tf_none). This patch fixes this by plumbing 'complain' from tsubst_qualified_id through check_accessibility_of_qualified_id to reach perform_or_defer_access_check, and by giving check_accessibility_of_qualified_id the appropriate return value. gcc/cp/ChangeLog: PR c++/90880 * cp-tree.h (check_accessibility_of_qualified_id): Add tsubst_flags_t parameter and change return type to bool. * parser.c (cp_parser_lookup_name): Pass tf_warning_to_error to check_accessibility_of_qualified_id. * pt.c (tsubst_qualified_id): Return error_mark_node if check_accessibility_of_qualified_id returns false. * semantics.c (check_accessibility_of_qualified_id): Add complain parameter. Pass complain instead of tf_warning_or_error to perform_or_defer_access_check. Return true unless perform_or_defer_access_check returns false. gcc/testsuite/ChangeLog: PR c++/90880 * g++.dg/template/sfinae29.C: New test.
Diffstat (limited to 'gcc/cfgexpand.c')
0 files changed, 0 insertions, 0 deletions