Skip to Content.
Sympa Menu

freetds - Re: [freetds] TDS_INT8_MIN determined by shifting a negative value

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] TDS_INT8_MIN determined by shifting a negative value
  • Date: Thu, 19 May 2016 11:52:57 +0100

2016-05-18 21:49 GMT+01:00 John Kendall <john AT capps.com>:
> Is there another way to determine TDS_INT8_MIN in convert.c (line 96)?
>
> The new llvm compiler on OS X 10.11 is complaining about bit shifting a
> negative:
>
> warning: shifting a negative signed value is undefined
> [-Wshift-negative-value]
>
> John
>

I would go for something like

#define TDS_INT8_MIN (-((TDS_INT8)1)<<62)-((TDS_INT8)1)<<62))

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page