Commit 8190f073 by Jason Merrill

update

From-SVN: r23757
parent 668d9af5
...@@ -40,12 +40,7 @@ struct S { ...@@ -40,12 +40,7 @@ struct S {
typedef struct S T; typedef struct S T;
S a = T(); // OK S a = T(); // OK
struct T * p; // error struct T * p; // ERROR - using typedef after struct
//case01 //case01
typedef bool short;// ERROR - .* typedef bool short;// ERROR - .*
...@@ -11,6 +11,7 @@ public: ...@@ -11,6 +11,7 @@ public:
int a; int a;
}; };
int
main() main()
{ {
char buffer[1024]; char buffer[1024];
......
// Build don't link: // Build don't link:
// Special g++ Options: -fexceptions -Wall // Special g++ Options: -fexceptions -Wall
int
main() { main() {
throw 1; throw 1;
} }
...@@ -18,6 +18,8 @@ struct Type ...@@ -18,6 +18,8 @@ struct Type
Type a; Type a;
Type b; Type b;
TypeKind c; TypeKind c;
int
main() { main() {
a.kind = b.kind = c; a.kind = b.kind = c;
(a.kind = c) = b.kind; // gets bogus error (a.kind = c) = b.kind; // gets bogus error
......
...@@ -17,6 +17,8 @@ OpResult fn1() { ...@@ -17,6 +17,8 @@ OpResult fn1() {
} }
extern void foo(); extern void foo();
int
main () { main () {
if (fn1() == Ok) { // WARNING - if (fn1() == Ok) { // WARNING -
foo(); foo();
......
...@@ -119,6 +119,7 @@ tryIt(const String& filename) ...@@ -119,6 +119,7 @@ tryIt(const String& filename)
} }
} }
int
main() main()
{ {
tryIt("goodFile.txt"); tryIt("goodFile.txt");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment