summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/builtin4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/builtin4.C')
-rw-r--r--gcc/testsuite/g++.dg/ext/builtin4.C10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/builtin4.C b/gcc/testsuite/g++.dg/ext/builtin4.C
new file mode 100644
index 000000000..8804b53bd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/builtin4.C
@@ -0,0 +1,10 @@
+// Verify that builtin is used when declared in global namespace
+
+// { dg-do compile }
+// { dg-options "-Wall" }
+
+extern "C" int printf(const char*,...);
+
+void foo() {
+ printf("%d"); // { dg-warning "expects a matching" }
+}