On Sun, Jun 19, 2011 at 7:49 AM, Ralf Wildenhues <ralf.wildenh...@gmx.de> wrote: > Hello, > > * James Youngman wrote on Sun, Jun 19, 2011 at 12:57:01AM CEST: >> On Sat, Jun 18, 2011 at 11:24 PM, Karl Berry <k...@freefriends.org> wrote: >> > I suspect that the most useful thing we can do in gnulib is define >> > PATH_MAX to a non-constant expression on all platforms, >> > >> > And intentionally break loads of existing code? >> > I am highly doubtful that that is "useful"; "painful" sounds more >> > accurate :). >> >> I much prefer obvious breakage, in which problem code simply fails to >> compile, to subtle breakage where your code compiles on all the >> systems you have access to but still has subtle problems. > > Is it possible to define it to an expression which will cause a warning > if used in a way requiring it to be a constant expression?
ISO C requires an array bounds expression to be a constant-expression (in the circumstances, not a surprise) but many implementations don't produce a warning when some other kind of expression is used. James. > > If not, that sounds like it could be a useful GCC extension (if maybe one > not so easy to implement). > > Cheers, > Ralf >