You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
#include "config.h"
#include "system.h"
#include "vec.h"
#include "target.h"
-#define GCC_BAD(gmsgid) do { warning (0, gmsgid); return; } while (0)
+#define GCC_BAD(gmsgid) \
+ do { warning (OPT_Wpragmas, gmsgid); return; } while (0)
#define GCC_BAD2(gmsgid, arg) \
- do { warning (0, gmsgid, arg); return; } while (0)
+ do { warning (OPT_Wpragmas, gmsgid, arg); return; } while (0)
typedef struct align_stack GTY(())
{
break;
}
if (entry == NULL)
- warning (0, "\
+ warning (OPT_Wpragmas, "\
#pragma pack(pop, %s) encountered without matching #pragma pack(push, %s)"
, IDENTIFIER_POINTER (id), IDENTIFIER_POINTER (id));
}
GCC_BAD ("malformed %<#pragma pack%> - ignored");
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of %<#pragma pack%>");
+ warning (OPT_Wpragmas, "junk at end of %<#pragma pack%>");
if (flag_pack_struct)
GCC_BAD ("#pragma pack has no effect with -fpack-struct - ignored");
if (SUPPORTS_WEAK && DECL_EXTERNAL (decl) && TREE_USED (decl)
&& !DECL_WEAK (decl) /* Don't complain about a redundant #pragma. */
&& TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
- warning (0, "%Japplying #pragma weak %qD after first use results "
- "in unspecified behavior", decl, decl);
+ warning (OPT_Wpragmas, "applying #pragma weak %q+D after first use "
+ "results in unspecified behavior", decl);
declare_weak (decl);
}
t = c_lex (&x);
}
if (t != CPP_EOF)
- warning (0, "junk at end of #pragma weak");
+ warning (OPT_Wpragmas, "junk at end of #pragma weak");
decl = identifier_global_value (name);
if (decl && DECL_P (decl))
GCC_BAD ("malformed #pragma redefine_extname, ignored");
t = c_lex (&x);
if (t != CPP_EOF)
- warning (0, "junk at end of #pragma redefine_extname");
+ warning (OPT_Wpragmas, "junk at end of #pragma redefine_extname");
if (!flag_mudflap && !targetm.handle_pragma_redefine_extname)
{
name = targetm.strip_name_encoding (name);
if (strcmp (name, IDENTIFIER_POINTER (newname)))
- warning (0, "#pragma redefine_extname ignored due to conflict with "
- "previous rename");
+ warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
+ "conflict with previous rename");
}
else
change_decl_assembler_name (decl, newname);
if (previous)
{
if (TREE_VALUE (previous) != newname)
- warning (0, "#pragma redefine_extname ignored due to conflict with "
- "previous #pragma redefine_extname");
+ warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
+ "conflict with previous #pragma redefine_extname");
return;
}
GCC_BAD ("malformed #pragma extern_prefix, ignored");
t = c_lex (&x);
if (t != CPP_EOF)
- warning (0, "junk at end of #pragma extern_prefix");
+ warning (OPT_Wpragmas, "junk at end of #pragma extern_prefix");
if (targetm.handle_pragma_extern_prefix)
/* Note that the length includes the null terminator. */
oldname = targetm.strip_name_encoding (oldname);
if (asmname && strcmp (TREE_STRING_POINTER (asmname), oldname))
- warning (0, "asm declaration ignored due to "
+ warning (OPT_Wpragmas, "asm declaration ignored due to "
"conflict with previous rename");
/* Take any pending redefine_extname off the list. */
{
/* Only warn if there is a conflict. */
if (strcmp (IDENTIFIER_POINTER (TREE_VALUE (t)), oldname))
- warning (0, "#pragma redefine_extname ignored due to "
+ warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
"conflict with previous rename");
*p = TREE_CHAIN (t);
{
if (strcmp (TREE_STRING_POINTER (asmname),
IDENTIFIER_POINTER (newname)) != 0)
- warning (0, "#pragma redefine_extname ignored due to "
+ warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
"conflict with __asm__ declaration");
return asmname;
}
{
if (!VEC_length (visibility, visstack))
{
- GCC_BAD ("No matching push for %<#pragma GCC visibility pop%>");
+ GCC_BAD ("no matching push for %<#pragma GCC visibility pop%>");
}
else
{
}
}
if (c_lex (&x) != CPP_EOF)
- warning (0, "junk at end of %<#pragma GCC visibility%>");
+ warning (OPT_Wpragmas, "junk at end of %<#pragma GCC visibility%>");
}
#endif