more errors
authorMatthias Braun <matze@braunis.de>
Tue, 27 May 2008 12:21:57 +0000 (12:21 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 27 May 2008 12:21:57 +0000 (12:21 +0000)
[r19788]

parsetest/cp_error025.c [new file with mode: 0644]
parsetest/cp_error026.c [new file with mode: 0644]

diff --git a/parsetest/cp_error025.c b/parsetest/cp_error025.c
new file mode 100644 (file)
index 0000000..44b58a7
--- /dev/null
@@ -0,0 +1,10 @@
+struct s {
+       char x[30];
+};
+
+struct s x[] = { "blup" };
+
+int main(void)
+{
+       return x[0].x[0] != 'b';
+}
diff --git a/parsetest/cp_error026.c b/parsetest/cp_error026.c
new file mode 100644 (file)
index 0000000..5ebd090
--- /dev/null
@@ -0,0 +1,18 @@
+/* fmt and all further parameters must be passed on the stack even for regparams */
+#include <stdio.h>
+#include <stdarg.h>
+
+static void f(const char* fmt, ...)
+{
+  va_list va;
+  va_start(va, fmt);
+  vprintf(fmt, va);
+  va_end(va);
+}
+
+
+int main(void)
+{
+  f("Hallo, %s!\n", "Welt");
+  return 0;
+}