Merged r157653 through r157895 into branch.
[official-gcc.git] / gcc / testsuite / obj-c++.dg / cxx-scope-2.mm
blob21fed5085fc87a27d8a671b036d3b94bb89dd6e3
1 /* Make sure Objective-C++ can distinguish ObjC classes from C++ classes.  */
2 /* Author: Ziemowit Laski  <zlaski@apple.com> */
4 /* { dg-do compile } */
6 #include "../objc-obj-c++-shared/Object1.h"
7 #include <iostream>
8 #include <string>
10 @interface iostream: Object
11 @end
13 int main(void) {
14   id i = [std::iostream new];  /* { dg-warning "not an Objective\\-C class name or alias" } */
15   i = [iostream new];
16   i = [std::basic_string<char> new];  /* { dg-warning "not an Objective\\-C class name or alias" } */
18   return 0;