repl-vsnprintf.c:396:0: error: ISO C forbids an empty translation unit

Hans Åberg haberg-1 at telia.com
Tue Feb 13 13:38:12 UTC 2018



> On 13 Feb 2018, at 12:24, Torbjörn Granlund <tg at gmplib.org> wrote:
> 
> Dennis Clarke <dclarke at blastwave.org> writes:
> 
>  As a minor annoyance it does cause gcc ( recent versions 7.x ) to fail.
>  Oddly enough ye Oracle Studio 12.6 cc running in strict c99 mode is fine
>  and happy with everything. That is a new experience for me. However the
>  performance on sparc is miserable.  We all know this and we know why.
> 
> I like Vincent's proposal; I had thought we needed to add something
> which leaves garbage in the object files.

There is a discussion here [1]: The translation unit is the input source, it seems, which must be non-empty, but not the resulting object file; however, a conforming compiler can complain about whatever.

1. https://bytes.com/topic/c/answers/222053-empty-translation-unit-valid




More information about the gmp-bugs mailing list