diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-07-29 09:15:36 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-07-29 09:15:36 +0200 |
commit | 21156a2fcf48764762c7f2209fa850024378d83a (patch) | |
tree | e56bb6ee6b8099b3520c4e97ccd1cd776ff9eb7a /cparser/Lexer.mll | |
parent | c7832c32253cdc2123313731c7cbbace4fc8332c (diff) | |
download | compcert-21156a2fcf48764762c7f2209fa850024378d83a.tar.gz compcert-21156a2fcf48764762c7f2209fa850024378d83a.zip |
Classified all warnings and added various options.
Now each warning either has a name and can be turned on/off, made
into an error,etc. or is a warning that always will be triggered.
The message of the warnings are similar to the ones emited by
gcc/clang and all fit into one line.
Furthermore the diagnostics are now colored if colored output is
available.
Bug 18004
Diffstat (limited to 'cparser/Lexer.mll')
-rw-r--r-- | cparser/Lexer.mll | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll index d3747e22..71aad604 100644 --- a/cparser/Lexer.mll +++ b/cparser/Lexer.mll @@ -126,16 +126,16 @@ let currentLoc = (* Error reporting *) let fatal_error lb fmt = - Cerrors.fatal_error ("%s:%d: Error:@ " ^^ fmt) - lb.lex_curr_p.pos_fname lb.lex_curr_p.pos_lnum + Cerrors.fatal_error + (lb.lex_curr_p.pos_fname,lb.lex_curr_p.pos_lnum) fmt let error lb fmt = - Cerrors.error ("%s:%d: Error:@ " ^^ fmt) - lb.lex_curr_p.pos_fname lb.lex_curr_p.pos_lnum + Cerrors.error + (lb.lex_curr_p.pos_fname,lb.lex_curr_p.pos_lnum) fmt let warning lb fmt = - Cerrors.warning ("%s:%d: Warning:@ " ^^ fmt) - lb.lex_curr_p.pos_fname lb.lex_curr_p.pos_lnum + Cerrors.warning + (lb.lex_curr_p.pos_fname,lb.lex_curr_p.pos_lnum) Cerrors.Unnamed ("warning: " ^^ fmt) (* Simple character escapes *) |