This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to print column numbers in diagnostics
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Per Bothner <per at bothner dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: 13 Feb 2005 02:25:18 +0100
- Subject: Re: PATCH to print column numbers in diagnostics
- Organization: Integrable Solutions
- References: <420E748E.7020500@bothner.com>
Per Bothner <per@bothner.com> writes:
| This patch prints the column number if non-zero, but only
| if USE_MAPPED_LOCATION. So for now it has limited usefulness,
| and it may be reasonable to defer until after the branch.
| On the other hand, it seems pretty safe, and it may encourage
| people to save column numbers in declarations and expressions.
| An ilustration where this patch makes a difference, see this
| patch: http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00594.html
|
| Here is a C++ example:
| void foo ()
| {
| int x;
| int y;
| int x;
| }
| /tmp/err.cc: In function Âvoid foo()Â:
| /tmp/err.cc:5:3: error: redeclaration of Âint xÂ
| /tmp/err.cc:3:3: error: Âint x previously declared here
|
| As an aside: Column 7 (the column of the declared identifier)
| would be more useful than column 3 (the start column of the
| declaration); consider: 'int x, y, x;'. Changing this would
| presumably be a modest fix to the C++ parser.
|
| Ok after 4.0 has branched? Ok now?
I think this is post-4.0 material. Queued.
-- Gaby