Project

General

Profile

« Previous | Next » 

Revision 496ddbc2

Added by shyouhei (Shyouhei Urabe) about 7 years ago

LIST_HEAD as a local variable is a C99ism.

Address of a variable whose storage duration is auto is not a
compile time constant, according to ISO 9899 section 6.4.
LIST_HEAD takes such thing. You can't use it to declare local
variables.

Interestingly, address of a static variable is a compile time
constant. So a declaration like static LIST_HEAD.. is
completely legal even in C90.

In C99 and newer, this is not a constraint violation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e