This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unable to use caret diagnostics


To build gcc I did the following (after making sure I had all the
prerequisites and the like)

svn checkout svn://gcc.gnu.org/svn/gcc/trunk SomeLocalDir
mkdir g++
cd g++
../g++/configure
make
make install

To test the install, I did as follows (after checking that the version
number was new, etc). The example was taken directly from the example
page.

daniel@daniel-Virtual-Machine:
~/programming$ cat gcc-test1.c
void foo(char **p, char **q)
{
    (p-q)();
    p();
}
daniel@daniel-Virtual-Machine:~/programming$ gcc gcc-test1.c -fsyntax-only
#'exact_div_expr' not supported by pp_c_expression#'gcc-test1.c: In
function 'foo':
gcc-test1.c:3:7: error: called object  is not a function
gcc-test1.c:4:3: error: called object 'p' is not a function
daniel@daniel-Virtual-Machine:~/programming$ gcc gcc-test1.c
-fsyntax-only -fdiagnostics-show-caret
gcc: error: unrecognized command line option '-fdiagnostics-show-caret'
daniel@daniel-Virtual-Machine:~/programming$ gcc --version
gcc (Ubuntu/Linaro 20120314-0ubuntu2) 4.8.0 20120314 (experimental)
[trunk revision 185382]
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


On Tue, Mar 5, 2013 at 9:50 AM, Ian Lance Taylor <iant@google.com> wrote:
> On Tue, Mar 5, 2013 at 5:33 AM, Daniel B Mosesson
> <dmosess1@binghamton.edu> wrote:
>> According to http://gcc.gnu.org/wiki/Better_Diagnostics and
>> http://gcc.gnu.org/wiki/ClangDiagnosticsComparison there should be a
>> way to get caret diagnostics in gcc 4.8. I have just checked out and
>> built gcc 20120314 (experimental) [trunk revision 185382], and I
>> cannot seem to get the examples to work. When I try to use the
>> -fdiagnostics-show-caret option listed in the better_diagnostics page,
>> gcc informs me that the option is not recognized.
>>
>> Is there a way to troubleshoot this issue, or this by design?
>
> It works for me.  In fact, caret diagnostics are on by default in 4.8.
>
> Show us exactly what you did and exactly what happened.
>
> Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]