aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/cxx-scope-2.mm
blob: 69aca20fb5639d21ed450d2081090fa2eded417c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* APPLE LOCAL file Objective-C++ */
/* Make sure Objective-C++ can distinguish ObjC classes from C++ classes.  */
/* Author: Ziemowit Laski  <zlaski@apple.com> */
/* { dg-do compile } */

#include <objc/Object.h>
#include <iostream>
#include <string>

@interface iostream: Object
@end

int main(void) {
  id i = [std::iostream new];  /* { dg-warning "not an Objective\\-C class name or alias" } */
  i = [iostream new];
  i = [std::basic_string<char> new];  /* { dg-warning "not an Objective\\-C class name or alias" } */

  return 0;
}