bugGNU roff - Bugs: bug #57733, [PATCH] grn/...cpp: Remove the...

 
 

bug #57733: [PATCH] grn/...cpp: Remove the specifier "register"

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Mon 03 Feb 2020 09:21:18 PM UTC
   
 
Category:  Preprocessor grn Severity:  2 - Minor
Item Group:  Lint Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 31 May 2022 04:49:39 AM UTC, comment #4: 

Thanks for the update, Bjarni.


commit eead5f5cf1dedc6d180bdb34914d7157d39e270c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Aug 16 12:37:22 2021 +1000

    [grn]: Fix code style issues.

    * src/preproc/grn/hgraph.cpp:
    * src/preproc/grn/hpoint.cpp:
    * src/preproc/grn/main.cpp:
    * src/preproc/grn/hdb.cpp: Drop use of `register` storage class.

    * src/preproc/grn/hgraph.cpp (len, HGPrintElt, picurve):
    * src/preproc/grn/hdb.cpp (DBRead): Wrap long lines.

    * src/preproc/grn/hgraph.cpp: Rename function from `Paramaterize` to
      `Parameterize`.

      (HGCurve): Update call site.

    * src/preproc/grn/main.cpp (add_file): Drop redundant cast in
      `realloc()` call.

      (conv, interpret): Use standard English in diagnostic messages.


G. Branden Robinson <gbranden>
Group administrator
Mon 30 May 2022 01:35:47 AM UTC, comment #3: 

  Fixed with commit eead5f5cf1dedc6d180bdb34914d7157d39e270c from 16th
August 2021.

Bjarni Ingi Gislason <bjarniig>
Tue 04 Feb 2020 07:22:44 AM UTC, comment #2: 

I actually disagree with your philosophy on this, Ingo.

I don't find Bjarni's reports to choke to clog or groff bug list, but admittedly I used to maintain the entire XFree86 monolith for Debian and its bug list ran into the many hundreds, maybe over a thousand.  It was truly daunting.

However, I don't blame you if you don't want to work on them.  I'm willing to, as time permits.

G. Branden Robinson <gbranden>
Group administrator
Mon 03 Feb 2020 09:33:09 PM UTC, comment #1: 

Yes, the register keyword has been pointless for a long time now.
It does not help but does no harm either.

But i consider such tickets detrimental.

Finding such stuff is 100% trivial if someone wants to fix it,
the ticket doesn't help one bit.  Its only effect is congesting the bug tracker and making it harder to find substantial tickets.

Any objections that i close it as "won't fix"?

Ingo Schwarze <schwarze>
Group Member
Mon 03 Feb 2020 09:21:18 PM UTC, original submission:  

Subject: [PATCH] grn/...cpp: Remove the specifier "register"

  A compiler can issue:

warning: ISO C++17 does not allow 'register' storage class specifier
[-Wregister]

  Stroustrup in "The C++ Programming Language, Third Edition" (28th
printing November 2008) writes on page 806:

"Declaring a variable register is a hint to the compiler to optimize
for frequent access; doing so is redundant with most modern compilers."

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 src/preproc/grn/hdb.cpp    |  16 +++---
 src/preproc/grn/hgraph.cpp | 106 ++++++++++++++++++-------------------
 src/preproc/grn/hpoint.cpp |   2 +-
 src/preproc/grn/main.cpp   |  32 +++++------
 4 files changed, 78 insertions(+), 78 deletions(-)

  The patch is in the attachment.

Bjarni Ingi Gislason <bjarniig>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by schwarze (Posted a comment)
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-05-31 gbranden Item GroupBuild/Installation Lint
        StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2022-01-11 gbranden Item GroupWarning/Suspicious behaviour Build/Installation
    2020-02-04 gbranden StatusNone Confirmed
    2020-02-04 gbranden Severity1 - Wish 2 - Minor
        Assigned toNone gbranden
    2020-02-03 schwarze Item GroupBuild/Installation Warning/Suspicious behaviour
    2020-02-03 schwarze Severity3 - Normal 1 - Wish
        Item GroupWarning/Suspicious behaviour Build/Installation
    2020-02-03 bjarniig Attached File- Added 0001-grn-.cpp-Remove-the-specifier-register.txt, #48341

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code