Subject: Re: Fix for PR#23300 (cpp and -Wtraditional)
To: James Chacon <jmc@NetBSD.org>
From: Christos Zoulas <firstname.lastname@example.org>
Date: 12/15/2003 18:35:08
On Dec 15, 5:02pm, jmc@NetBSD.org (James Chacon) wrote:
-- Subject: Re: Fix for PR#23300 (cpp and -Wtraditional)
| #error is a historical odditity though as to what's valid vs expected.
| Traditional cpp implementations say "#error isn't a valid token so error out"
| and that's exactly what people used it for. All standardizing did there was
| make it part of the spec vs undefined localized behavior (which under the
| implementations I've used error'd out as expected).
| For the rest the warning should remain the same as #elif would (under
| traditional auspices) error out. Therefore it needs the leading whitespace
| to work/not error on traditional. Doing that to #error changes the behaviour
| returned to the programmer by 180 degrees which is going to be highly
| Granted this is no different than using #foobar as a way to error out but
| #error is exactly what was used traditionally and then grew into C89.
Yes, and the hack was to indent #error statements so that the # was not
in the first column.