Whatever happened to the 'entry' keyword?

后端 未结 4 1144
青春惊慌失措
青春惊慌失措 2020-12-16 09:18

While cruising through my white book the other day, I noticed in the list of C keywords. entry is one of the keywords on that list.

It is reserved f

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-16 10:03

    To complement the accepted answer 'entry' is mentioned in K&R1:

    2.3 Keywords

    The following identifiers are reserved for use as keywords, and may not be used otherwise

    int extern else

    char register for

    float typedef do

    double static while

    struct goto switch

    union return case

    long sizeof default

    short break entry

    unsigned continue

    auto if

    and here:

    The entry keyword is not currently implemented by any compiler but is reserved for future use. Some implementations also reserve the words 'fortran' and 'asm'.

    Then in the Rationale for the ANSI C language (C89) it is mentioned here:

    3.1.1 Keyword

    [...]

    The keywords 'entry' 'fortran', and 'asm' have not been included since they were either never used, or are not portable. Uses of 'fortran' and 'asm' as keywords are not as common extensions.

提交回复
热议问题