> Paul Eggert <[EMAIL PROTECTED]> writes:
>
> | From: Jim Meyering <[EMAIL PROTECTED]>
> | Date: 13 Mar 2000 23:55:52 +0100
> |
> | FYI, even indented, `#error' is not portable.
> | SunOS 4.1.4 cc rejects it.
> |
> | Hmm, that doesn't match my recollection. I just checked, and
> | SunOS 4.1.4 cc compiles and runs the following program just fine:
> |
> | #if 0
> | #error "foo"
> | #endif
> | main() { return 0; }
>
> Hmm...
> I didn't test it, but rather based it on a fileutils ChangeLog entry
> from you. Maybe you were using a different version of cc back when
> you wrote it?
#if 1
#error "foo"
#endif
main() { return 0; }
produces this:
"foo.c", line 2: illegal character: '#'
"foo.c", line 2: syntax error at or near string "foo"
"foo.c", line 2: unknown size
which is probably not what the person using #error would expect.
--
Thomas E. Dickey
[EMAIL PROTECTED]
http://www.clark.net/pub/dickey