Allow the static chain to be set from C
authorRichard Henderson <rth@redhat.com>
Wed, 19 Nov 2014 13:31:24 +0000 (05:31 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 19 Nov 2014 13:31:24 +0000 (05:31 -0800)
commit74893f25916c3cdcc7ad26af391c3f59a2a51a98
tree6e11f41a5ade384361d3bf280fa4e43b0e99fa63
parentf2d3d07ee55fa52b41c1ec08e51269831961a772
Allow the static chain to be set from C

We need to be able to set the static chain on a few calls within the
Go runtime, so expose this with __builtin_call_with_static_chain.

        * c-family/c-common.c (c_common_reswords): Add
        __builtin_call_with_static_chain.
        * c-family/c-common.h (RID_BUILTIN_CALL_WITH_STATIC_CHAIN): New.
        * c/c-parser.c (c_parser_postfix_expression): Handle it.
        * doc/extend.texi (__builtin_call_with_static_chain): Document it.

From-SVN: r217771
gcc/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c/c-parser.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cwsc0.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/cwsc1.c [new file with mode: 0644]