Issue #15347 has been updated by k0kubun (Takashi Kokubun).


For developer's reference, I created https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/C99 and linked it from https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto.

----------------------------------------
Misc #15347: Require C99
https://bugs.ruby-lang.org/issues/15347#change-76195

* Author: k0kubun (Takashi Kokubun)
* Status: Closed
* Priority: Normal
* Assignee: 
----------------------------------------
## Problem
We've spent a lot of time for supporting C90 https://github.com/ruby/ruby/search?o=desc&q=c99&s=committer-date&type=Commits.
It is not only time-consuming but also sometimes sacrifices readability like r66034 (today's commit).

## Suggestion
Ruby 3 is planned to be released around 2020. As 30th anniversary of C90, it may be a good time to re-consider dropping support of C90 on the major version upgrade.

## Known issues
* Microsoft Visual Studio C++
  * We don't know which VC++ version supports which feature of C99: https://twitter.com/unak/status/1025937122161618944 (Japanese tweet)
* Solaris
  * Solaris Studio 12.4 uses C89 on Solaris 10 by default [Bug #14200]
  * Solaris 10's GCC uses C90 by default [Bug #14751]
  * We don't know how well C99 support is supported on Solaris 10 or 11

Please comment to this ticket if you know more.

### Possible approaches
* Investigate C99 features supported by VC++, document allowed C99 features in https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowTo, and somehow prepare CI environment that monitors conformity of it on AppVeyor or Azure Pipelines.
* Solaris seems to support C99 but it's disabled by default. We might be able to enable that on configure and some features we want to use could work.
  * Notable information: Solaris 10 Extended Support ends Jan 2021 http://www.oracle.com/us/support/library/lifetime-support-hardware-301321.pdf. If we assume (of course, not decided yet) Ruby 3 is released in Dec 2020, it'll be just 1-month earlier of it.
* Print warnings for future breakage on Ruby 3 when building Ruby 2.6 or 2.7, for some EOL platforms.

## Disclaimer
I'm NOT intending to disrupt users by this. 

I just want to make it easier to maintain Ruby interpreter by allowing to use some useful and portable C99 features if and only if almost all Ruby users can compile Ruby interpreter with it by our efforts on build system.
I don't know if it's feasible or not. I want to collect information of it and possibly give up to have the hope for using C99 if it's turned out to be too difficult.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>