[GRASS5] compile error in splitfont.c in module for_grass

Moritz Lennert mlennert at club.worldonline.be
Tue Jul 8 08:42:41 EDT 2003


Glynn Clements said:
>
> Moritz Lennert wrote:
>
>> I get the following error compiling GRASS5.0 CVS version:
>>
>> splitfont.c: In function `main':
>> splitfont.c:132: unrecognizable insn:
>> (insn 943 922 463 (set (reg/v:QI 63)
>>         (const_int 129 [0x81])) -1 (nil)
>>     (expr_list:REG_EQUAL (const_int 129 [0x81])
>>         (nil)))
>> splitfont.c:132: Internal compiler error in extract_insn, at
>> recog.c:2148
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>> make[1]: *** [OBJ.i686-pc-linux-gnu/splitfont.o] Erreur 1
>> make[1]: Leaving directory `/data/GRASSCVS/grass/src/fonts/for_grass'
>> GISGEN failure at STEP: src/fonts/for_grass
>>
>> Is this a gcc problem or a GRASS problem ?
>
> A bit of both. Given that main() is declared as returning "int", it
> should actually have a "return" statement. OTOH, gcc really shouldn't
> be throwing an internal compiler error.
>
> The attached patch should solve the problem.
>
> --
> Glynn Clements <glynn.clements at virgin.net>
>
> --- src/fonts/for_grass/splitfont.c~	Thu Jul  3 21:41:13 2003
> +++ src/fonts/for_grass/splitfont.c	Mon Jul  7 18:09:56 2003
> @@ -128,7 +128,7 @@
>  		write (newfont, &newoffset, sizeof(newoffset));
>  		close (newfont);
>  	}
> -	exit(0);
> +	return 0;
>  }
>
>  int savechar (int font, int newfont)
>


As for Markus, this doesn't solve the problem for me. Linking /usr/bin/gcc
to /usr/bin/gcc-2.95 instead of /usr/bin/gcc-3.2 did the trick.

Moritz




More information about the grass-dev mailing list