diff options
author | johnvg | 2010-10-07 11:21:55 +0000 |
---|---|---|
committer | johnvg | 2010-10-07 11:21:55 +0000 |
commit | 711f56804a4f12c8826a97ebcd56cc6f7ec5cc9d (patch) | |
tree | f1280c97384f83268ed5b2c49428d39687db8eeb /backendC | |
parent | convert negative line numbers to 0, (diff) |
disable 'function may fail' warnings for Clean 2
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1804 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backendC')
-rw-r--r-- | backendC/CleanCompilerSources/codegen.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/backendC/CleanCompilerSources/codegen.c b/backendC/CleanCompilerSources/codegen.c index 3eaf5da..080b322 100644 --- a/backendC/CleanCompilerSources/codegen.c +++ b/backendC/CleanCompilerSources/codegen.c @@ -953,10 +953,13 @@ static void CodeRule (ImpRuleP rule) if (rule_may_fail){ ++CurrentAltLabel.lab_post; - + CurrentLine=rule->rule_alts->alt_line; - StaticMessage (FunctionMayFailIsError, "%S", "function may fail", CurrentSymbol); - +#if CLEAN2 + if (FunctionMayFailIsError) +#endif + StaticMessage (FunctionMayFailIsError, "%S", "function may fail", CurrentSymbol); + MatchError (asize,bsize,rule_sdef,root_node_needed,0); } @@ -1195,7 +1198,7 @@ void CodeGeneration (ImpMod imod, char *fname) Verbose ("Code generation"); if (!OpenABCFile (fname)){ - StaticMessage (True, "<open file>","Can't create abc file (disk full?)"); + StaticMessage (True, "<open file>","Can't create abc file '%s'",fname); return; } |