+2001-03-06 Zack Weinberg <zackw@stanford.edu>
+
+ * objc/objc-act.c (objc_add_static_instance): Set DECL_INITIAL
+ and DECL_DEFER_OUTPUT on the decl we create, before calling
+ rest_of_decl_compilation.
+
2001-03-06 Zack Weinberg <zackw@stanford.edu>
* aclocal.m4 (AM_GNU_GETTEXT): Don't AC_REQUIRE
from 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
* c-parse.gperf, c-gperf.h: Delete.
- (c-gperf.h was accidently re-added to the CVS repo in the rev 1.16 commit
- by tromey)
+ (c-gperf.h was accidently re-added to the CVS repo in the rev
+ 1.16 commit by tromey)
2001-03-03 Neil Booth <neil@daikokuya.demon.co.uk>
DECL_COMMON (decl) = 1;
TREE_STATIC (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
+ DECL_INITIAL (decl) = constructor;
+
+ /* We may be writing something else just now.
+ Postpone till end of input. */
+ DECL_DEFER_OUTPUT (decl) = 1;
pushdecl_top_level (decl);
rest_of_decl_compilation (decl, 0, 1, 0);
- /* Do this here so it gets output later instead of possibly
- inside something else we are writing. */
- DECL_INITIAL (decl) = constructor;
-
/* Add the DECL to the head of this CLASS' list. */
TREE_PURPOSE (*chain) = tree_cons (NULL_TREE, decl, TREE_PURPOSE (*chain));
+2001-03-06 Zack Weinberg <zackw@stanford.edu>
+
+ * objc/execute/string1.m, objc/execute/string2.m: Compare the
+ result of -cString against what we expect it to be; don't just
+ print it out for no one to read.
+
+ * objc/execute/string3.m, objc/execute/string4.m: New tests.
+ Based on testcases provided by Nicola Pero.
+
2001-03-03 Neil Booth <neil@daikokuya.demon.co.uk>
* gcc.dg/cpp/macro7.c: New test.
-#include <stdio.h>
+/* Based on a test case contributed by Nicola Pero. */
+
+#include <string.h>
+#include <stdlib.h>
#include <objc/NXConstStr.h>
int main(int argc, void **args)
{
- printf ([@"this is a string\n" cString]);
+ if (strcmp ([@"this is a string" cString], "this is a string"))
+ abort ();
return 0;
}
-#include <stdio.h>
+/* Based on a test case contributed by Nicola Pero. */
+
+#include <string.h>
+#include <stdlib.h>
#include <objc/NXConstStr.h>
int main(int argc, void **args)
{
- printf ([@"this " @"is " @"a " @"string\n" cString]);
+ if (strcmp ([@"this " @"is " @"a " @"string" cString],
+ "this " "is " "a " "string"))
+ abort ();
return 0;
}
--- /dev/null
+/* Based on a test case contributed by Nicola Pero. */
+
+#include <string.h>
+#include <stdlib.h>
+#include <objc/NXConstStr.h>
+
+#define STRING "this is a string"
+
+int main (int argc, void **args)
+{
+ if (strcmp ([@STRING cString], STRING))
+ abort ();
+ return 0;
+}
--- /dev/null
+/* Based on a test case contributed by Nicola Pero. */
+
+#include <string.h>
+#include <stdlib.h>
+#include <objc/NXConstStr.h>
+
+int main(int argc, void **args)
+{
+ if ([@"this is a string" length] != strlen ("this is a string"))
+ abort ();
+ return 0;
+}