Eric Blake wrote:
> > int a = PATH_MAX;
> 
> Shouldn't this be:
> 
> static int a[PATH_MAX];

Maybe. Or possibly:
  enum { a = PATH_MAX };

Are there cases when these three declarations don't all succeed and don't
all fail?

I'm not so familiar with the various classes of constant expressions.
Paul certainly knows better.

> do we also 
> want to enforce that it is usable as a preprocessor number, as in 
> something like:
> 
> #ifdef PATH_MAX
> # if !PATH_MAX
> #  error
> # endif
> #endif

I have no objection against that. It appears safe on all platforms.

Bruno
-- 
Cato Bontjes van Beek <http://en.wikipedia.org/wiki/Cato_Bontjes_van_Beek>

Reply via email to