[Top][All Lists]

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

Re: Possible bug or simple nuisance compiler warning

From: Akim Demaille
Subject: Re: Possible bug or simple nuisance compiler warning
Date: Sun, 29 Nov 2020 09:33:50 +0100

Hi Jot,

> Le 29 nov. 2020 à 02:12, Jot Dot <jotdot@shaw.ca> a écrit :
> Let me know if I'm finally quoting correctly. (Thanks to Christian for 
> pointing it out) 

Well, not really.  If for instance you look at Christian's email 
(https://lists.gnu.org/r/help-bison/2020-11/msg00003.html) you'll see that one 
can easily tell what you wrote ('>'), and what he wrote.  Compare this with 
your answer: https://lists.gnu.org/r/bug-bison/2020-11/msg00025.html.  But your 
BQ marks do make it better than nothing.

>> You mean recursive descent—Bison's parsers are pretty decent too. 
> No, I meant it was just faster / easier / more fun to do my projects by hand. 
> Recursive decent is intuitive when writing by hand.

I know, and I enjoy this too (as long as the grammar is not too big, and not 
expected to change).  Any CS student should have written an LL parser by hand 
at least once.  But you missed my point: the correct spelling is "descent", not 

>> I would very much like to have your grammar, so that I can check if there is 
>> really a danger or not. It is super unlikely that there is, but I would 
>> appreciate to be able to have a closer look. If you prefer, you can send me 
>> your grammar privately, and I promise I won't publish it. 
> I don't want to waste your time doing something I should be doing. 
> As I add in more rules and error checking, I can debug and see if any values 
> get out of range. 
> If I see any issues with it, I can contact you regarding this. 
> If you want it anyways, let me know. I can send it to you. 

Yes please, I would like to have the grammar of yours that triggered the 
warnings from your compiler.  Not a fixed version, not any recent version, but 
_exactly_ the version of the file that prompted you to start this thread.  Or, 
if you lost it, any version with the very same symptoms.

> FWIW: Look at it from my point of view: I'm just starting off with 
> flex/bison.. finally more than just playing with it. 

> In less than one week I found two issues. I couldn't believe it was anything 
> more than my inexperience. 
> Why? Adapting your own words: I find this hard to believe. Flex/Bison's 
> reputation is solid. 

I don't share your arithmetics.  I see just one **potential** issue whose most 
probable resolution will be a cast to silence a (legitimate) compiler warning.  
I don't see what second thing you are referring to.  So far, Bison and Flex's 
reputations still stand.

But lemme be clear: there *are* bugs, I'm sure of this.  Any non trivial piece 
of software written by hand by a human is guaranteed to host bugs.  What 
actually matters is how likely the remaining ones will bite.  In spite of my 
good intentions, I keep on adding new bugs in Bison, and I do have to publish 
bug-fix releases.  So I'm not claiming there ain't any bugs in Bison, I'm 
claiming I'm not convinced you found one.  I need to see your file.

> I couldn't believe it was anything more than my inexperience. 
> Why? Adapting your own words: I find this hard to believe. Flex/Bison's 
> reputation is solid. 
> And that's not including the two bugs I had with Microsoft's products during 
> my work with this. 
> One of them (lots of code that I reduced to a very simple illustration): 
> class A { public: int x; .... }; 
> class B :public A { ... }; 
> class C :public B { 
> public: 
> void someMethod() { 
> x = 1; // x not found 
> B:x = 1; // Works 

You mean B::, and I find it also hard to believe, unless you're using a very 
old version of the compiler.  The older versions are known to be bad at C++ 
compliance and full of bugs, but its quality has been steadily improving, AFAIK 
(I don't use it).  As a matter of fact, even for Bison's warning I would like 
to know what version of the compiler you are running.

> Let me know if you still want that file. 

I do.  Thanks!

reply via email to

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