The Go Programming Language Specification go语言规范 Version of May 9, 2018 Introduction 介绍 Notation 符号 Source code representation 源代码表示形式 Characters 字符 Letters and digits 字母和数字 Lexical elements 词法元素 Comments 评论 Tokens 令 牌 Semicolons 分号 Identifiers 标识符 K
6.1 GNU C 的扩展关键字:attribute GNU C 增加一个 __atttribute__ 关键字用来声明一个函数.变量或类型的特殊属性.声明这个特殊属性有什么用呢?主要用途就是指导编译器在编译程序时进行特定方面的优化或代码检查.比如,我们可以通过使用属性声明指定某个变量的数据边界对齐方式. __atttribute__ 的使用非常简单,当我们定义一个函数.变量或类型时,直接在它们名字旁边添加下面的属性声明即可: __atttribute__((ATTRIBUTE)) 这里需要注意