[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting involved in Bison
From: |
Akim Demaille |
Subject: |
Re: Getting involved in Bison |
Date: |
Thu, 24 Oct 2019 09:03:09 +0200 |
Hi Victor,
> Le 24 oct. 2019 à 04:41, Morales Cayuela, Victor (NSB - CN/Hangzhou)
> <address@hidden> a écrit :
>
> Hello!
>
> Yesterday I finally compiled the project.
Great news! Congrats :)
You did run the test suite successfully too?
> When do I start? What can I do? :)
Let's start with something simple. How about this item in the TODO?
** Stop indentation in diagnostics
Before Bison 2.7, we printed "flatly" the dependencies in long diagnostics:
input.y:2.7-12: %type redeclaration for exp
input.y:1.7-12: previous declaration
In Bison 2.7, we indented them
input.y:2.7-12: error: %type redeclaration for exp
input.y:1.7-12: previous declaration
Later we quoted the source in the diagnostics, and today we have:
/tmp/foo.y:1.12-14: warning: symbol FOO redeclared [-Wother]
1 | %token FOO FOO
| ^~~
/tmp/foo.y:1.8-10: previous declaration
1 | %token FOO FOO
| ^~~
The indentation is no longer helping. We should probably get rid of it, or
maybe keep it only when -fno-caret. GCC displays this as a "note":
$ g++-mp-9 -Wall /tmp/foo.c -c
/tmp/foo.c:1:10: error: redefinition of 'int foo'
1 | int foo, foo;
| ^~~
/tmp/foo.c:1:5: note: 'int foo' previously declared here
1 | int foo, foo;
| ^~~
Likewise for Clang, contrary to what I believed (because "note:" is written
in black, so it doesn't show in my terminal :-)
$ clang++-mp-8.0 -Wall /tmp/foo.c -c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior
is deprecated [-Wdeprecated]
/tmp/foo.c:1:10: error: redefinition of 'foo'
int foo, foo;
^
/tmp/foo.c:1:5: note: previous definition is here
int foo, foo;
^
1 error generated.
- Re: Getting involved in Bison, (continued)
- Re: Getting involved in Bison, Paul Eggert, 2019/10/15
- Re: Getting involved in Bison, Akim Demaille, 2019/10/15
- RE: Getting involved in Bison, Morales Cayuela, Victor (NSB - CN/Hangzhou), 2019/10/16
- Re: Getting involved in Bison, Adrian Vogelsgesang, 2019/10/16
- Re: Getting involved in Bison, Akim Demaille, 2019/10/16
- RE: Getting involved in Bison, Morales Cayuela, Victor (NSB - CN/Hangzhou), 2019/10/17
- Re: Getting involved in Bison, Akim Demaille, 2019/10/17
- RE: Getting involved in Bison, Morales Cayuela, Victor (NSB - CN/Hangzhou), 2019/10/20
- Re: Getting involved in Bison, Akim Demaille, 2019/10/21
- RE: Getting involved in Bison, Morales Cayuela, Victor (NSB - CN/Hangzhou), 2019/10/23
- Re: Getting involved in Bison,
Akim Demaille <=
- RE: Getting involved in Bison, Morales Cayuela, Victor (NSB - CN/Hangzhou), 2019/10/24
- Re: Getting involved in Bison, Akim Demaille, 2019/10/24
- RE: Getting involved in Bison, Morales Cayuela, Victor (NSB - CN/Hangzhou), 2019/10/27