gmp-impl.h assumes 32-bit unsigned int in fft_table_nk

Robert Baruch robert.c.baruch at gmail.com
Fri Dec 18 06:22:42 UTC 2015


GMP version: 6.1.0

Test program: N/A, just compiling GMP

Description:
=======================
My system defines unsigned int as 16 bits. Thus, something like
struct fft_table_nk {
  unsigned int n:27;
  ...
}
will cause the compiler to complain that there are not enough bits (see
output_from_make.txt attached)
=======================

Platform: Ubuntu 15.10 32-bit

Configure options: CC=avr-gcc CFLAGS=-mmcu=atmega328p --host=avr

// Yes, I realize that trying to compile a high performance multi precision
library like GMP for an *8-bit microcontroller* is bordering on lunacy, but
I thought I'd try.

Output from configure: attached
Output from make: attached

Compilers: gcc: 5.2.1 20151010, avr-gcc: 4.8.1 (obtained via apt-get
gcc-avr)

uname -a: Linux robuntu 4.2.0-21-generic #25-Ubuntu SMP Wed Dec 2 18:41:50
UTC 2015 i686 i686 i686 GNU/Linux

./config.guess: sandybridge-pc-linux-gnu
./configfsf.guess: i686-pc-linux-gnu
config.log: attached

Comments
==============================
Looks like gmp-impl.h defines gmp_uint_least32_t so maybe that's what
should be used if we want a 27 bit field?
==============================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output_from_configure.txt.gz
Type: application/x-gzip
Size: 4374 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20151218/4e7c9781/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.gz
Type: application/x-gzip
Size: 24613 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20151218/4e7c9781/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output_from_make.txt.gz
Type: application/x-gzip
Size: 885 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20151218/4e7c9781/attachment-0005.bin>


More information about the gmp-bugs mailing list