bugmake - Bugs: bug #65448, $(intcmp) problems with negative...

 
 

bug #65448: $(intcmp) problems with negative integers

Submitter:  Robert Bogomip <bobbogo>
Submitted:  Mon 11 Mar 2024 02:23:24 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.4.1 Operating System:  Any
Fixed Release:  SCM Triage Status:  Small Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 28 Mar 2024 11:20:02 PM UTC, comment #2: 

Fix applied; thanks Jouke

Paul D. Smith <psmith>
Group administrator
Mon 11 Mar 2024 07:52:00 PM UTC, comment #1: 

Indeed, it seems we currently compare magnitudes instead of values. I've attached a fix and regression tests.

(file #55826)

Jouke Witteveen <jwitteveen>
Mon 11 Mar 2024 02:23:24 PM UTC, original submission:  

intcmp complains when given non-integer input:

$ make --eval '$(error [$(intcmp hello,7,small,same,large)])'
make: *** non-numeric first argument to 'intcmp' function: 'hello'.  Stop.


It is quite happy parsing negative input:

$ make --eval '$(error [$(intcmp -8,7,small,same,large)])'
make: *** [small].  Stop.


But gets this one wrong:

$ make --eval '$(error [$(intcmp -8,-7,small,same,large)])'
make: *** [large].  Stop.


Gnu make 4.4.1 on Fedora 39, package make-4.4.1-2.fc39.x86_64

Robert Bogomip <bobbogo>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #55826:  0001-SV-65448-Compare-values-instead-of-magnitudes-in-int.patch added by jwitteveen (3KiB - text/x-patch - Fix and regression tests)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by jwitteveen (Updated the item)
  • -email is unavailable- added by bobbogo (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-28 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Operating SystemNone Any
        Fixed ReleaseNone SCM
        Triage StatusNone Small Effort
    2024-03-11 jwitteveen Attached File- Added 0001-SV-65448-Compare-values-instead-of-magnitudes-in-int.patch, #55826

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code