autoconf
[Top][All Lists]
Advanced

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

Re: Failing of test 47: semantics.at:129 on HP-UX 10.20


From: Paul Eggert
Subject: Re: Failing of test 47: semantics.at:129 on HP-UX 10.20
Date: Sun, 17 Jun 2001 22:53:12 -0700 (PDT)

> From: Alexandre Oliva <address@hidden>
> Date: 17 Jun 2001 19:20:13 -0300
> 
> On Jun 11, 2001, Akim Demaille <address@hidden> wrote:
> 
> > It's very easy to set a guard against such compilers.  But once we
> > detected the compiler cannot evaluate such expressions, what do we do?
> 
> Would it work with a switch/case statement instead of an array
> declaration?

I wouldn't bother trying to rewrite the test.  It's not worth worrying
about compilers that are that buggy, particularly since this
particular case is contrived and won't happen in real life.

FYI, for GNU applications I have written C code that looks like this:

#define ASSERT(name, condition) char name[(condition) ? 1 : -1]
ASSERT(long_is_wide_enough, sizeof size_t <= sizeof long);

This rejects C9x implementations where long is narrower than size_t.
If a compiler can't handle constructions like this, then it will
mishandle such code.  Too bad for the compiler.



reply via email to

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