tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Proposal: change requirement for tools from C89 to C99



On 2/2/22 8:57 PM, Joerg Sonnenberger wrote:
Am Wed, Feb 02, 2022 at 10:28:43AM +0900 schrieb PHO:
I'm all for switching to C99! "int i; for (i = 0; ..." have always made me
anxious!


On 2/2/22 6:36 AM, Andrew Cagney wrote:
On Mon, 31 Jan 2022 at 14:53, Roland Illig <roland.illig%gmx.de@localhost> wrote:

Am 31.01.2022 um 11:14 schrieb Robert Elz:
I don't follow C standards.   What are the c99 features we'd
want to use in tools that don't work in c89?
[snip]

* Use the function modifier 'inline' unconditionally.

Or not bother.  The compiler tends to have its own ideas, especially
when link-time-optimization is enabled.

There is one case you need to bother: inline functions in a header file.
Compilers decide if they want to inline them or compile them as weak
symbols, but they never generate strong ones.

Are you talking about C or C++ here? Because C inline should not result
in a weak definition at all.

Ah... you're right. I forgot that C and C++ treated inline functions differently.

Home | Main Index | Thread Index | Old Index