[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `#error' vs string literal

From: Jim Meyering
Subject: Re: `#error' vs string literal
Date: Tue, 07 Mar 2006 17:20:52 +0100

Ralf Wildenhues <address@hidden> wrote:
> Another thing struck me:
> * Paul Eggert wrote on Wed, Mar 01, 2006 at 01:48:54AM CET:
>>      (AC_HEADER_STDBOOL): Don't assume "#error" works.

Glad you spotted that.

> This technique is not followed consistently in gnulib (unlike Autoconf).
> I remember that `#error' does not provoke failure everywhere, but don't
> remember the offending compiler/system.
> But there is even a patch to the contrary in gnulib, from coreutils:
> | 2005-08-27  Jim Meyering  <address@hidden>
> |
> |         * md5.c: Use `#error' rather than a string literal to provoke 
> failure.
> |         * sha1.c: Likewise.
> I could not find corresponding discussion or bug reports.  What's the
> gist of this?

There had been uses of #error in coreutils for so long without
complaint, so I felt comfortable with making the above change.

Paul, have you found a reasonable porting target (always the key :-)
on which #error doesn't work?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]