diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-26 21:21:58 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-26 21:21:58 +0000 |
commit | 32ecf960daad601066214fb92caf61ad0e73474e (patch) | |
tree | 37cbb1525929f4ecbfc1d14e764c60d380839efd /gcc/doc | |
parent | 431ae4eec407cc4a6559fa795f0b1cdf0788dc2e (diff) | |
download | gcc-32ecf960daad601066214fb92caf61ad0e73474e.tar.gz |
In cp/error.c, I separate the initialization of the diagnostic context
from the initialization of the scratch pretty-printer (cxx_pp). This
was suggested by Gabriel in the last review of the patch and now I
realize it was a good idea. Now cxx_initialize_diagnostics is the
equivalent version of c_initialize_diagnostics. To avoid having to
make extern a bunch of functions, I moved it from cp-objcp-common.c to
error.c.
I moved the setting of diagnostic_format_decoder (global_dc) =
c_tree_printer, from c_objc_common_init to c_initialize_diagnostics,
and right after c_common_diagnostics_set_defaults. This
mimics what is done in cxx_initialize_diagnostics.
Moreover, in both c_initialize_diagnostics and
cxx_initialize_diagnostics, the FE-specific pretty-printer is
initialized first and then other settings are applied. This does not
make a difference right now, but if in the future one wishes to touch
something in the pretty-printer, it will not get overriden
immediately.
In fact, the code I removed in c_common_initialize_diagnostics, which
sets line_cutoff to 80, is useless because the pretty-printer created
here is actually never used, but overriden by the FE-specific
pretty-printers. This also means that doc/invoke.texi was wrong.
Finally, it is useless to set the maximum line length to 0 in the
constructor of cxx_pretty_printer. It is the default anyway.
gcc/c/ChangeLog:
2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53061
* c-objc-common.c (c_objc_common_init): Do not do diagnostics
initialization here...
(c_initialize_diagnostics): ... but here. Set defaults after
building pretty-printer.
gcc/ChangeLog:
2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53061
* doc/invoke.texi (fmessage-length): Update text to match reality.
gcc/cp/ChangeLog:
2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53061
* cp-objcp-common.c: Do not include new.
(cxx_initialize_diagnostics): Move from here to ...
* error.c (cxx_initialize_diagnostics): : ... here. Move
diagnostics initialization here from init_error.
(cxx_pp): Use a real pointer not a macro.
(init_error): Just initialize cxx_pp.
* cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
not set maximum line length.
gcc/c-family/ChangeLog:
2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53061
* c-opts.c (c_common_diagnostics_set_defaults): Renamed from
c_common_initialize_diagnostics.
* c-common.h: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216720 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 9c68aebe6d2..9f21c9623a9 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -3078,11 +3078,10 @@ honor these options. @table @gcctabopt @item -fmessage-length=@var{n} @opindex fmessage-length -Try to format error messages so that they fit on lines of about @var{n} -characters. The default is 72 characters for @command{g++} and 0 for the rest of -the front ends supported by GCC@. If @var{n} is zero, then no -line-wrapping is done; each error message appears on a single -line. +Try to format error messages so that they fit on lines of about +@var{n} characters. If @var{n} is zero, then no line-wrapping will be +done; each error message will appear on a single line. This is the +default for all front ends. @item -fdiagnostics-show-location=once @opindex fdiagnostics-show-location |