[tex-live] portability issue in texmfmp.c

Jonathan Kew jonathan_kew at sil.org
Sat Dec 30 19:21:35 CET 2006


On 30 Dec 2006, at 1:59 pm, Martin Schröder wrote:

> 2006/12/29, Jonathan Kew <jonathan_kew at sil.org>:
>> I believe this will cause problems, because puts the declaration
>> "poolpointer i;" after a statement. This is legal in C++ and C99, but
>> not in more traditional C, and some current compilers will reject it.
>> (gcc accepts it, though I suppose if one used the -ansi and perhaps -
>> pedantic options, it might complain.)
>
> I compile the sources with gcc and -std=c99 -Wall. Neither -ansi nor
> -pedantic catch this case.


With gcc 4.0.3 on Ubuntu, using -pedantic (and *not* -std=c99) gives:

   warning: ISO C90 forbids mixed declarations and code

but does not actually halt with an error (unfortunately... it should,  
IMO). -std=c99 (with or without -pedantic) will suppress this because  
C99 allows this usage, but Vladimir's compiler on AIX and Akira's on  
W32 (at least) do not support C99, AFAIK.

JK



More information about the tex-live mailing list