2015-02-27 Kai Tietz <ktietz@redhat.com>
PR c/35330
* c-pragma.c (handle_pragma_weak): Do not try to create
weak/alias of declarations not being function, or variable
declarations.
2015-02-27 Kai Tietz <ktietz@redhat.com>
PR c/35330
* gcc.dg/weak/weak-17.c: New file.
From-SVN: r221053
+2015-02-27 Kai Tietz <ktietz@redhat.com>
+
+ PR c/35330
+ * c-pragma.c (handle_pragma_weak): Do not try to create
+ weak/alias of declarations not being function, or variable
+ declarations.
+
2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
PR libgomp/64625
decl = identifier_global_value (name);
if (decl && DECL_P (decl))
{
+ if (!VAR_OR_FUNCTION_DECL_P (decl))
+ GCC_BAD2 ("%<#pragma weak%> declaration of %q+D not allowed,"
+ " ignored", decl);
apply_pragma_weak (decl, value);
if (value)
{
+2015-02-27 Kai Tietz <ktietz@redhat.com>
+
+ PR c/35330
+ * gcc.dg/weak/weak-17.c: New file.
+
2015-02-27 Richard Biener <rguenther@suse.de>
PR lto/65193
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-weak "" } */
+#pragma weak int = foo
+
+/* { dg-warning "declaration of" "weak" { target *-*-* } 0 } */