Misc #15347


Require C99

Added by k0kubun (Takashi Kokubun) over 3 years ago. Updated over 3 years ago.




We've spent a lot of time for supporting C90
It is not only time-consuming but also sometimes sacrifices readability like r66034 (today's commit).


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++
  • 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, 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.
  • Print warnings for future breakage on Ruby 3 when building Ruby 2.6 or 2.7, for some EOL platforms.


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.

Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #14200: addr2line.c compile error with C89 compilers on Solaris 10ClosedActions
Related to Ruby master - Bug #15519: addr2line compile error on RHEL7ClosedActions

Also available in: Atom PDF