Project

General

Profile

Actions

Bug #12974

closed

libc: left shift of negative value

Added by Toomas Soome over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

Build errors on SPARC:

    ../port/gen/_ftoll.c: In function '__dtoll':
    ../port/gen/_ftoll.c:107:34: error: left shift of negative value [-Werror=shift-negative-value]
            (m1 >> (62 - exp)) & ~(-1 << (exp - 30));
                                      ^~
    ../port/gen/_ftoll.c: In function '_Q_qtoll':
    ../port/gen/_ftoll.c:278:34: error: left shift of negative value [-Werror=shift-negative-value]
            (m1 >> (62 - exp)) & ~(-1 << (exp - 30));
                                      ^~
    cc1: all warnings being treated as errors

replace -1 by UINT_MAX.

Actions #1

Updated by Joshua M. Clulow over 3 years ago

  • Gerrit CR set to 805
Actions #2

Updated by Electric Monk about 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 7aaede4825001926ae223b8c47ef9e4d0d6021ba

commit  7aaede4825001926ae223b8c47ef9e4d0d6021ba
Author: Toomas Soome <tsoome@me.com>
Date:   2020-09-08T05:41:10.000Z

    12974 libc: left shift of negative value
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Gary Mills <gary_mills@fastmail.fm>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF