Commit 7de1d221 by Janis Johnson Committed by Janis Johnson

c-pragma.c (enum pragma_switch_t): Prefix constants with PRAGMA_.

	* c-pragma.c (enum pragma_switch_t): Prefix constants with PRAGMA_.
	(handle_stdc_pragma): Use new enum constant names.
	(handle_pragma_float_const_decimal64): Ditto.

From-SVN: r147492
parent bfefafc6
2009-05-13 Janis Johnson <janis187@us.ibm.com>
* c-pragma.c (enum pragma_switch_t): Prefix constants with PRAGMA_.
(handle_stdc_pragma): Use new enum constant names.
(handle_pragma_float_const_decimal64): Ditto.
2009-05-13 Ian Lance Taylor <iant@google.com> 2009-05-13 Ian Lance Taylor <iant@google.com>
* Makefile.in (build/gencheck.o): Depend upon all-tree.def, not * Makefile.in (build/gencheck.o): Depend upon all-tree.def, not
......
...@@ -1180,7 +1180,7 @@ valid_location_for_stdc_pragma_p (void) ...@@ -1180,7 +1180,7 @@ valid_location_for_stdc_pragma_p (void)
return valid_location_for_stdc_pragma; return valid_location_for_stdc_pragma;
} }
enum pragma_switch_t { ON, OFF, DEFAULT, BAD }; enum pragma_switch_t { PRAGMA_ON, PRAGMA_OFF, PRAGMA_DEFAULT, PRAGMA_BAD };
/* A STDC pragma must appear outside of external declarations or /* A STDC pragma must appear outside of external declarations or
preceding all explicit declarations and statements inside a compound preceding all explicit declarations and statements inside a compound
...@@ -1198,33 +1198,33 @@ handle_stdc_pragma (const char *pname) ...@@ -1198,33 +1198,33 @@ handle_stdc_pragma (const char *pname)
{ {
warning (OPT_Wpragmas, "invalid location for %<pragma %s%>, ignored", warning (OPT_Wpragmas, "invalid location for %<pragma %s%>, ignored",
pname); pname);
return BAD; return PRAGMA_BAD;
} }
if (pragma_lex (&t) != CPP_NAME) if (pragma_lex (&t) != CPP_NAME)
{ {
warning (OPT_Wpragmas, "malformed %<#pragma %s%>, ignored", pname); warning (OPT_Wpragmas, "malformed %<#pragma %s%>, ignored", pname);
return BAD; return PRAGMA_BAD;
} }
arg = IDENTIFIER_POINTER (t); arg = IDENTIFIER_POINTER (t);
if (!strcmp (arg, "ON")) if (!strcmp (arg, "ON"))
ret = ON; ret = PRAGMA_ON;
else if (!strcmp (arg, "OFF")) else if (!strcmp (arg, "OFF"))
ret = OFF; ret = PRAGMA_OFF;
else if (!strcmp (arg, "DEFAULT")) else if (!strcmp (arg, "DEFAULT"))
ret = DEFAULT; ret = PRAGMA_DEFAULT;
else else
{ {
warning (OPT_Wpragmas, "malformed %<#pragma %s%>, ignored", pname); warning (OPT_Wpragmas, "malformed %<#pragma %s%>, ignored", pname);
return BAD; return PRAGMA_BAD;
} }
if (pragma_lex (&t) != CPP_EOF) if (pragma_lex (&t) != CPP_EOF)
{ {
warning (OPT_Wpragmas, "junk at end of %<#pragma %s%>", pname); warning (OPT_Wpragmas, "junk at end of %<#pragma %s%>", pname);
return BAD; return PRAGMA_BAD;
} }
return ret; return ret;
...@@ -1260,14 +1260,14 @@ handle_pragma_float_const_decimal64 (cpp_reader *ARG_UNUSED (dummy)) ...@@ -1260,14 +1260,14 @@ handle_pragma_float_const_decimal64 (cpp_reader *ARG_UNUSED (dummy))
switch (handle_stdc_pragma ("STDC FLOAT_CONST_DECIMAL64")) switch (handle_stdc_pragma ("STDC FLOAT_CONST_DECIMAL64"))
{ {
case ON: case PRAGMA_ON:
set_float_const_decimal64 (); set_float_const_decimal64 ();
break; break;
case OFF: case PRAGMA_OFF:
case DEFAULT: case PRAGMA_DEFAULT:
clear_float_const_decimal64 (); clear_float_const_decimal64 ();
break; break;
case BAD: case PRAGMA_BAD:
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment