OSDN Git Service

* cp-tree.h (finish_enum): Change prototype.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 21 Apr 2001 00:04:08 +0000 (00:04 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 21 Apr 2001 00:04:08 +0000 (00:04 +0000)
* decl.c (finish_enum): Reorganize.
* parse.y (structsp): Adjust calls to finish_enum.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41473 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.old-deja/g++.other/enum4.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.other/enum4.C b/gcc/testsuite/g++.old-deja/g++.other/enum4.C
new file mode 100644 (file)
index 0000000..f401613
--- /dev/null
@@ -0,0 +1,13 @@
+// Origin: Mark Mitchell <mark@codesourcery.com>
+// Special g++ Options: -fshort-enums
+
+enum E { 
+  a = -312
+};
+
+E e = a;
+
+int main () {
+  if ((int) e != -312)
+    return 1;
+}