[ci skip] Clarify usage of C99 standard (#14993)

This is mostly about mentioning that VLAs which are a required part of
C99 conforming implementations (although made optional in the C11
standard) *must* *not* be used in php-src.
This commit is contained in:
Christoph M. Becker 2024-07-18 11:40:58 +02:00 committed by GitHub
parent 223683dfb5
commit f507da913a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,9 +9,12 @@ rewritten to comply with these rules.
1. Document your code in source files and the manual. (tm) 1. Document your code in source files and the manual. (tm)
1. PHP is implemented in C99. The optional fixed-width integers from 1. PHP is implemented in C99.
For instance, the optional fixed-width integers from
stdint.h (int8_t, int16_t, int32_t, int64_t and their unsigned stdint.h (int8_t, int16_t, int32_t, int64_t and their unsigned
counterparts) must be available. counterparts) are supposed to be available.
However, some features (most notably variable-length arrays) which are not
supported by all relevant compilers, must not be used.
1. Functions that are given pointers to resources should not free them. 1. Functions that are given pointers to resources should not free them.