bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Getting involved in Bison


From: Morales Cayuela, Victor (NSB - CN/Hangzhou)
Subject: RE: Getting involved in Bison
Date: Thu, 24 Oct 2019 07:44:33 +0000

Perfect! I'll remove the indentation. Would you prefer the compiler style with 
"note: " or simply nothing?
As soon as I finish it I will send a diff.

Regards
Victor

-----Original Message-----
From: Akim Demaille <address@hidden> 
Sent: Thursday, October 24, 2019 3:03 PM
To: Morales Cayuela, Victor (NSB - CN/Hangzhou) <address@hidden>
Cc: Paul Eggert <address@hidden>; Bison Bugs <address@hidden>
Subject: Re: Getting involved in Bison

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]