Hi,

> At the same time, if we accept C99 it will be hard to enforce restrictions 
> with compilers and checksrc certainly will not stop most of the things in 
> that 
> list (the //-comments perhaps being the single exception).
>
> Thoughts?

I like the idea and agree that would be the perfect time to switch. Especially 
the mixed declarations and code will make contributions much easier for us C++ 
developers without getting headaches trying to avoid compiler warnings from 
conditionally used code.

Speaking of compiler restrictions though, as Christoph already mentioned, 
Visual Studio implemented (almost) full C99 support very late, which might be 
an issue:
- the intersection between C90 and C++98, like C++ comments and mixed code and 
declarations, has been supported since basically forever
- Visual Studio 2005 (which also dropped support for targeting Windows versions 
before 98 / NT 4.0) added variadic macros and long long
- Visual Studio 2010 (which only supports Windows XP and later) added stdint.h
- Visual Studio 2013 and later implemented more features
- full support (minus the features that were made optional in C11) was finally 
implemented in VS 2019 Update 8 (which only supports Windows Vista and later)

So we might have to use the subset of C99 supported by a particular "old 
enough" Visual Studio version, maybe 2013. And we could at the same time remove 
support for older Windows versions from the code, maybe making Windows 2000 the 
minimum, which classic MinGW still defaults to.

Marcel
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
  • C99 Daniel Stenberg via curl-library
    • Re: C99 Christoph M. Becker via curl-library
      • Re: C99 Daniel Stenberg via curl-library
    • RE: C99 Marcel Raad via curl-library
    • Re: C99 Emil Engler via curl-library
    • Re: C99 Kevin R. Bulgrien via curl-library
      • Re: C99 Ben Greear via curl-library
        • Re: C99 Dan Fandrich via curl-library
          • Re: C99 Kevin R. Bulgrien via curl-library
            • Re: C99 Dan Fandrich via curl-library
              • Re: C99 Rodrigo s via curl-library

Reply via email to