From: Robert Pengelly Date: Wed, 20 May 2026 16:15:27 +0000 (+0100) Subject: Fixed inline_s32 X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=scc.git Fixed inline_s32 --- diff --git a/Makefile.unix b/Makefile.unix index ff6ed36..d11d5cc 100755 --- a/Makefile.unix +++ b/Makefile.unix @@ -5,7 +5,7 @@ SRCDIR ?= $(CURDIR) VPATH := $(SRCDIR) CC := gcc -CFLAGS := -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra -std=c90 +CFLAGS := -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra CC_SRC := $(wildcard $(SRCDIR)/*.c) #VERSION := $(shell date '+%Y%m%d') diff --git a/Makefile.w32 b/Makefile.w32 index 3cc84f4..fde4014 100755 --- a/Makefile.w32 +++ b/Makefile.w32 @@ -5,7 +5,7 @@ SRCDIR ?= $(CURDIR) VPATH := $(SRCDIR) CC := gcc -CFLAGS := -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra -std=c90 +CFLAGS := -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra CC_SRC := $(wildcard $(SRCDIR)/*.c) diff --git a/parse.c b/parse.c index 45a2795..2bcfcc5 100644 --- a/parse.c +++ b/parse.c @@ -2314,7 +2314,7 @@ static long inline_s32 (long v) { unsigned long u = inline_u32 (v); if (u & 0x80000000UL) { - return (long) (u - 0x100000000UL); + return -((long) ((~u + 1UL) & 0xffffffffUL)); } return (long) u;