Wan*_*eck 5 c namespaces ansi naming-conventions standards-compliance
我正在查看谷歌go的运行时源代码(在https://go.googlecode.com/hg/src/pkg/runtime/),似乎他们使用特殊字符作为其函数名称,·.(例如,请访问https://go.googlecode.com/hg/src/pkg/runtime/cgocall.c).这是否被主要编译器接受?它不是ANSI C,是吗?或者它只是一些宏观魔法?
谢谢!
C90不允许标识符中的附加字符(超过基本字符集中的字符),C99(使用通用字符语法 - \uXXXX和\ UXXXXXXXX - 以及实现定义的其他字符集).
C99中的6.4.2.1/1:
identifier:
identifier-nondigit
identifier identifier-nondigit
identifier digit
identifier-nondigit:
nondigit
universal-character-name
other implementation-defined characters
nondigit: one of
_ a b c d e f g h i j k l m
n o p q r s t u v w x y z
A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z
digit: one of
0 1 2 3 4 5 6 7 8 9
Run Code Online (Sandbox Code Playgroud)
我不知道C实现支持得多好,我知道Plan9 C编译器在标准化之前可以处理其他字符.
| 归档时间: |
|
| 查看次数: |
1042 次 |
| 最近记录: |