# include "cgrammar.h"
# include "cgrammar_tokens.h"
+
+# include "fileIdList.h"
# include "portab.h"
static bool lastWasString = FALSE;
"volatile" { setTokLength (8); RETURN_TOK (QVOLATILE); }
"const" { setTokLength (5); RETURN_TOK (QCONST); }
-"restrict" { setTokLength (8); RETURN_TOK (QRESTRICT); }
/* some systems expect this! [gack!] */
"__const" { setTokLength (7); RETURN_TOK (QCONST); }
{
;
}
- else if (flagcode_isModeName (fflag))
+ else if (flagcode_isInvalid (fflag))
{
- if (ynm_isMaybe (set))
+ if (isMode (flagname))
{
- llerror
- (FLG_BADFLAG,
- message
- ("Semantic comment attempts to restore flag %s. "
- "A mode flag cannot be restored.",
- flagname));
+ if (ynm_isMaybe (set))
+ {
+ llerror
+ (FLG_BADFLAG,
+ message
+ ("Semantic comment attempts to restore flag %s. "
+ "A mode flag cannot be restored.",
+ flagname));
+ }
+ else
+ {
+ context_setMode (flagname);
+ }
}
else
{
- context_setMode (flagname);
+ voptgenerror
+ (FLG_UNRECOGFLAGCOMMENTS,
+ message ("Unrecognized option in semantic comment: %s",
+ flagname),
+ loc);
}
}
- else if (flagcode_isInvalid (fflag))
- {
- voptgenerror
- (FLG_UNRECOGFLAGCOMMENTS,
- message ("Unrecognized option in semantic comment: %s",
- flagname),
- loc);
- }
else if (flagcode_isGlobalFlag (fflag))
{
voptgenerror