@@ -12243,6 +12243,8 @@ grokdeclarator (const cp_declarator *declarator,
pedwarn (loc, OPT_Wpedantic, "%qs specified with %qT",
key, type);
ok = !flag_pedantic_errors;
+ type = DECL_ORIGINAL_TYPE (typedef_decl);
+ typedef_decl = NULL_TREE;
}
else if (declspecs->decltype_p)
error_at (loc, "%qs specified with %<decltype%>", key);
new file mode 100644
@@ -0,0 +1,9 @@
+// PR c++/102804
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wpedantic" }
+
+using int32_t = int;
+enum: unsigned int32_t { foo }; // { dg-warning "int32_t" }
+int f(int) = delete;
+int f(unsigned);
+auto x = f(1 ? foo : 1);