bison-patches
[Top][All Lists]
Advanced

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

Re: yacc.c: clarify the computation of yystate


From: Hans Åberg
Subject: Re: yacc.c: clarify the computation of yystate
Date: Wed, 24 Oct 2018 11:05:29 +0200

> On 24 Oct 2018, at 02:39, Paul Eggert <address@hidden> wrote:
> 
> On 10/22/18 8:52 AM, Akim Demaille wrote:
>> +          const int yylhs = yyr1[yyrule] - YYNTOKENS;
> 
> I used to work with someone who liked to declare C local variables 'register 
> const': 'register' so that he wasn't tempted to take the variable's address, 
> and 'const' so that he wasn't tempted to modify the variable. I tried to talk 
> him out of it, because to me 'register' and 'const' are complete overkill for 
> local variables; the compiler and the human reader can easily deduce these 
> properties statically, and they're not worth the valuable screen real estate 
> that they take up. But I couldn't talk him into it, so 'register const int 
> this' and 'register const int that' it was.

The keyword "register" has been deprecated in C++17, which is problem with Flex 
that writes it.

https://en.cppreference.com/w/cpp/keyword/register





reply via email to

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