p4173.c

来自「gcc3.2.1源代码」· C语言 代码 · 共 27 行

C
27
字号
// This error happens because lvalue is not done well in the C++ front-end.// NOPs should be lvalues if their arguments are.// NON_LVALUE_EXPRs shouldn't be.// Special g++ Options: -Wall -ansi -pedantic-errors// Build don't link:// prms-id: 4173enum TypeKind {    RecordTypeKind};struct Type{    enum TypeKind kind : 8;    unsigned char prefixLen;  };Type a;Type b;TypeKind c;intmain() {  a.kind = b.kind = c;  (a.kind = c) = b.kind;	// gets bogus error}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?