GNU bug report logs -
#64504
[PATCH] gnu: Add unsio.
Previous Next
Full log
Message #14 received at 64504 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Am Tue, Aug 08, 2023 at 01:37:14PM +0200 schrieb Iliya Tikhonenko:
> On 8/8/23 11:29, Andreas Enge wrote:
> > For the #:build-type, the default value (release with debug information) also works and results in a package of the same size. Is there a reason to change it? Modified patch attached.
> The debug build type is unnecessary verbose (see src/uns.cc line 71-73 for
> an example) to the point that it impacts performance sometimes, which is
> important considering the usecase of the library.
Okay, I have reinstated your line and added a comment.
> > I can also compile the package without the configure flags, are they useful?
> Checked again, I still cannot compile it without -DCMAKE_CXX_STANDARD=14
I can... Patch attached.
> > And there are lots of warnings about 34 bit shifts in a 32 bit type.
> > But I suppose you tested that the library works.
> I have not noticed any issues using it during the past two years, but this
> cannot be considered a proper test because I am actually using a small
> subset of the library. Perhaps, this warning should be reported upstream,
> thanks!
/tmp/guix-build-unsio-1.3.3-0.25e5246.drv-0/source/src/snapshotinterface.cc:125:45: warning: result of β(-2147483648 << 2)β requires 34 bits to represent, but βintβ only has 32 bits [-Wshift-overflow=]
125 | req_bits = (unsigned int) (( 1 << 31 )<<2)-1;
| ~~~~~~~~~~~~^~~~
Here is the offending line. This is indeed a bit surprising, as "int"
usually has 32 bits. The 1 to be shifted is a signed int; 1*2^31 is not
representable in the type, so if I understand the C standard correctly,
the result is undefined. Then I have seen a Stackoverflow comment that
it is okay in C++20. And indeed:
#:configure-flags #~(list "-DCMAKE_CXX_STANDARD=20")
passes without these warnings. Should we add this?
Although such constructs look a bit brittle to me, and it is not
suggested by the author.
There is still the question about the lib64/ installation directory,
I think this should be changed.
Andreas
[0001-gnu-Add-unsio.patch (text/plain, attachment)]
This bug report was last modified 1 year and 356 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.