소스 검색

new test file that breaks where it should

master
Nathan R 3 년 전
부모
커밋
cdb09a7433
1개의 변경된 파일10개의 추가작업 그리고 36개의 파일을 삭제
  1. +10
    -36
      ccmeta-tree.txt

+ 10
- 36
ccmeta-tree.txt 파일 보기

@ -1,36 +1,10 @@
typedef signed t;
typedef int plain;
struct tag {
unsigned t:4; // t is the name of the field
const t:5; // t is the name of the type of the unnamed 5-bit field
plain r:5;
};
struct tag2 {
int xx:8;
int :8; // a field with no name
int :8; // a field with no name
int yy:8;
};
typedef int a, (*b)(a intarg);
// ^ ^----------------------------------------|-------|
// (1) where does it say in the std that this name becomes a type name
// even before the end of the typedef declarator list that is a part of?
// (2) where in the std does is say how the scope of typedef names is
// handled (global, function-level, block-level, etc.)?
// (3) what are the exact rules about typedef scopes, and the different
// contexts in which a typedef can occur that causes it to have non-local
// or non-global scope?
// (4) printTree to show the real AST in addition to outputNode which prints
// source code.
int c(int x) { return x; }
b e = c;
unsigned x;
unsigned long int y;
void fun() {
typedef int i;
{
typedef float f;
i j1;
f g1;
}
i j2;
f g2; // <---- ERROR
}

불러오는 중...
취소
저장