BUG: struct keyword required before struct type name in tal-notreent.c

librik@panix.com librik at panix.com
Sat Apr 1 22:24:08 CEST 2006


A couple of function headers in GMP 4.2's tal-notreent.c define
struct-type parameters without using the keyword "struct" before
the type name.  This is a C++ idiom that GCC allows, but it's not
really correct C and won't compile elsewhere.

Luckily, this is easy to fix:  insert "struct" before the struct
name "tmp_marker", in __gmp_tmp_mark and gmp_tmp_free.


--- tal-notreent.c.struct       2006-04-01 14:05:56.776715200 -0600
+++ tal-notreent.c      2006-03-14 09:57:54.000000000 -0600
@@ -99,5 +99,5 @@
    storage.  */
 void
-__gmp_tmp_mark (struct tmp_marker *mark)
+__gmp_tmp_mark (tmp_marker *mark)
 {
   mark->which_chunk = current;
@@ -107,5 +107,5 @@
 /* Free everything allocated since <mark> was assigned by __gmp_tmp_mark */
 void
-__gmp_tmp_free (struct tmp_marker *mark)
+__gmp_tmp_free (tmp_marker *mark)
 {
   while (mark->which_chunk != current)


- David Librik
librik at panix.com


More information about the gmp-bugs mailing list