[Top][All Lists]

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

Re: [Tinycc-devel] Constant Initializer for Static Variables

From: Vincent Lefevre
Subject: Re: [Tinycc-devel] Constant Initializer for Static Variables
Date: Thu, 14 Apr 2022 11:43:09 +0200
User-agent: Mutt/2.2.2+9 (f082dd14) vl-138565 (2022-03-25)

On 2022-04-13 18:56:55 -0700, Elijah Stone wrote:
> const vars are not integer constant expressions; your code is not guaranteed
> to work.  Some gnu exts are implemented; this one is not.

Note that this is more an implemention-defined feature than
an extension. The C standard says:

  6.6 Constant expressions
  10  An implementation may accept other forms of constant expressions.

Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]