curl-library
Re: wishlist: curl_easy_setopt(3): add better bad input warning?
Date: Thu, 6 Mar 2008 00:18:58 +0000
Daniel Stenberg wrote:
> On Wed, 5 Mar 2008, Michal Marek wrote:
> >Actually, protection against this kind of error can be easily done using
> >standard C preprocessor:
> >
> >#define curl_easy_setopt(handle, option, value) \
> > curl_easy_setopt(handle, option, value)
>
> Ah true. But I have this gut feeling that if we'd enable this for everyone
> unconditonally, one of the more obscure and outdated compilers will scream
> at us at some point. I think I would rather prefer to at least start with
> enabling this stunt on the compilers we actually know will support it fine.
> Such as gcc and msvc (should still cover 98% of our user-base).
It should be accepted by any compiler claiming ANSI C. Macros which
contain their own name aren't common, but they're not extremely rare
either.
How about enabling it #if __STDC__ >= 1?
-- Jamie
Received on 2008-03-06