OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [report.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do assemble  }
// { dg-do assemble  }
// { dg-options "-Wreturn-type" }
// { dg-options "-Wreturn-type" }
// GROUPS passed error-reporting
// GROUPS passed error-reporting
// DR 295 allows qualification via typedef
// DR 295 allows qualification via typedef
template 
template 
class badoo
class badoo
{
{
};
};
template 
template 
class doowop
class doowop
{
{
};
};
struct A
struct A
{
{
  int a;
  int a;
  ~A () { a = 0; }
  ~A () { a = 0; }
  operator int () { return a; }
  operator int () { return a; }
};
};
extern "C" int atoi (const char *);
extern "C" int atoi (const char *);
int (*fee)(const char *) = atoi;
int (*fee)(const char *) = atoi;
int (**bar)(const char *) = &fee;
int (**bar)(const char *) = &fee;
const char* s = "4";
const char* s = "4";
const char** sp = &s;
const char** sp = &s;
const char*** spp = &sp;
const char*** spp = &sp;
int foo (int a = (**bar) (s))
int foo (int a = (**bar) (s))
{
{
   return doowop::bar; // { dg-error "" } not a member
   return doowop::bar; // { dg-error "" } not a member
}
}
int foo2 (int (*a)(int) = &foo)
int foo2 (int (*a)(int) = &foo)
{
{
   undef4 (1); // { dg-error "" } implicit declaration
   undef4 (1); // { dg-error "" } implicit declaration
  return 1;
  return 1;
}
}
class X{
class X{
  class Y{};                    // { dg-error "" } private
  class Y{};                    // { dg-error "" } private
};
};
typedef int const * bart ();
typedef int const * bart ();
//The following is DR295 dependant
//The following is DR295 dependant
typedef bart const * const * bar2;
typedef bart const * const * bar2;
typedef bart volatile * const * bar2v;
typedef bart volatile * const * bar2v;
bar2 baz (X::Y y)               // { dg-error "" } in this context
bar2 baz (X::Y y)               // { dg-error "" } in this context
{
{
  X::Y f;                       // { dg-error "" } in this context
  X::Y f;                       // { dg-error "" } in this context
  bar2 wa [5];
  bar2 wa [5];
  wa[0] = baz(f);
  wa[0] = baz(f);
  undef2 (1); // { dg-error "" } implicit declaration
  undef2 (1); // { dg-error "" } implicit declaration
}
}
int ninny ()
int ninny ()
{
{
  struct A
  struct A
    {
    {
          static int ninny2 () { return badoo<'\001'>::foo; } // { dg-error "" } not a member
          static int ninny2 () { return badoo<'\001'>::foo; } // { dg-error "" } not a member
    };
    };
  return A::ninny2();
  return A::ninny2();
}
}
int darg (char X::*p)
int darg (char X::*p)
{
{
   undef3 (1); // { dg-error "" } implicit declaration
   undef3 (1); // { dg-error "" } implicit declaration
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.