problem with gcc-3.4.0

Kevin Ryde user42 at zip.com.au
Sat Apr 24 00:06:57 CEST 2004


<keith.briggs at bt.com> writes:
>
> aorsmul.c:44: error: conflicting types for '__gmpz_aorsmul'
> aorsmul.c:39: error: previous declaration of '__gmpz_aorsmul' was here
> aorsmul.c:44: error: conflicting types for '__gmpz_aorsmul'
> aorsmul.c:39: error: previous declaration of '__gmpz_aorsmul' was here 

Thanks, gcc 3.4 is picky about having regparm on the definition as
well as the declaration.  Past versions only needed the declaration.
We'll be releasing a new version soon with a change,

        * mpz/aorsmul.c, mpz/aorsmul_i.c, mpz/cfdiv_q_2exp.c,
        mpz/cfdiv_r_2exp.c, mpq/aors.c, mpf/ceilfloor.c: Give REGPARM_ATTR()
        on function definition too, as demanded by by gcc 3.4.

This is just adding "REGPARM_ATTR (1)" like the following to each of
these files.  (You'll know the files because they don't compile :-).

@@ -39,7 +39,7 @@
 static void __gmpz_aorsmul _PROTO ((REGPARM_3_1 (mpz_ptr w, mpz_srcptr x, mpz_srcptr y, mp_size_t sub))) REGPARM_ATTR (1);
 #define mpz_aorsmul(w,x,y,sub)  __gmpz_aorsmul (REGPARM_3_1 (w, x, y, sub))

-static void
+REGPARM_ATTR (1) static void
 mpz_aorsmul (mpz_ptr w, mpz_srcptr x, mpz_srcptr y, mp_size_t sub)
 {
   mp_size_t  xsize, ysize, tsize, wsize, wsize_signed;

-- 
All followups to gmp-bugs at swox.com please.


More information about the gmp-bugs mailing list