aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2008-09-03 00:10:27 -0400
committerJason Merrill <jason@gcc.gnu.org>2008-09-03 00:10:27 -0400
commit4ad610c9785f0022e5ebe686650abaa7ff3c2d5c (patch)
tree593d0e7109cbda785c4e54b5d01f619e24dea375 /gcc/cp/decl.c
parenta63068b6dd49f620e85c95f1dfed8f7d7473e17c (diff)
downloadgcc-4ad610c9785f0022e5ebe686650abaa7ff3c2d5c.zip
gcc-4ad610c9785f0022e5ebe686650abaa7ff3c2d5c.tar.gz
gcc-4ad610c9785f0022e5ebe686650abaa7ff3c2d5c.tar.bz2
re PR c++/37208 (C++0x deleted functions and SFINAE)
PR c++/37208 * call.c (build_over_call): Make =delete work with SFINAE. * class.c (resolve_address_of_overloaded_function): Likewise. * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to threadprivate_or_deleted_p. (CP_DECL_THREADPRIVATE_P): Adjust. (DECL_DELETED_FN): Likewise. (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros. (SD_DELETED): New macro. * parser.c (cp_parser_init_declarator): Use them. * decl.c (start_decl): Use them. * decl2.c (mark_used): Give =deleted error even in sizeof. * typeck2.c (check_narrowing): Downgrade narrowing error to permerror. From-SVN: r139926
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 0d735c4..0f7b5d7 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3969,14 +3969,14 @@ groktypename (cp_decl_specifier_seq *type_specifiers,
grokfield.) The DECL corresponding to the DECLARATOR is returned.
If an error occurs, the error_mark_node is returned instead.
- DECLSPECS are the decl-specifiers for the declaration. INITIALIZED is 1
- if an explicit initializer is present, or 2 for an explicitly defaulted
- function, or 3 for an explicitly deleted function, but 0 if this is a
- variable implicitly initialized via a default constructor. ATTRIBUTES
- and PREFIX_ATTRIBUTES are GNU attributes associated with this
- declaration. *PUSHED_SCOPE_P is set to the scope entered in this
- function, if any; if set, the caller is responsible for calling
- pop_scope. */
+ DECLSPECS are the decl-specifiers for the declaration. INITIALIZED is
+ SD_INITIALIZED if an explicit initializer is present, or SD_DEFAULTED
+ for an explicitly defaulted function, or SD_DELETED for an explicitly
+ deleted function, but 0 (SD_UNINITIALIZED) if this is a variable
+ implicitly initialized via a default constructor. ATTRIBUTES and
+ PREFIX_ATTRIBUTES are GNU attributes associated with this declaration.
+ *PUSHED_SCOPE_P is set to the scope entered in this function, if any; if
+ set, the caller is responsible for calling pop_scope. */
tree
start_decl (const cp_declarator *declarator,
@@ -4034,7 +4034,7 @@ start_decl (const cp_declarator *declarator,
return error_mark_node;
case FUNCTION_DECL:
- if (initialized == 3)
+ if (initialized == SD_DELETED)
/* We'll handle the rest of the semantics later, but we need to
set this now so it's visible to duplicate_decls. */
DECL_DELETED_FN (decl) = 1;