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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900127_02.C] - Diff between revs 305 and 338

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

Rev 305 Rev 338
// { dg-do assemble  }
// { dg-do assemble  }
// g++ 1.36.1 bug 900127_02
// g++ 1.36.1 bug 900127_02
// g++ (mostly) keeps separate name spaces for the declarations of data
// g++ (mostly) keeps separate name spaces for the declarations of data
// objects and functions.
// objects and functions.
// This means that a single name may be declared as both a data object and
// This means that a single name may be declared as both a data object and
// a function within a given scope.
// a function within a given scope.
// This fact allows programmers to write code which is not portable to the
// This fact allows programmers to write code which is not portable to the
// Cfront translator (which keeps a single namespace for these entities).
// Cfront translator (which keeps a single namespace for these entities).
// This can also lead to ambiguity when the & (address-of) operator is used.
// This can also lead to ambiguity when the & (address-of) operator is used.
// Cfront 2.0 passes this test.
// Cfront 2.0 passes this test.
// keywords: name spaces, overloading
// keywords: name spaces, overloading
int global0;                    // { dg-error "" }
int global0;                    // { dg-error "" }
int global0 ();                 // { dg-error "" }
int global0 ();                 // { dg-error "" }
int global1 ();                 // { dg-error "" } xref for below
int global1 ();                 // { dg-error "" } xref for below
int global1;                    // { dg-error "" } caught
int global1;                    // { dg-error "" } caught
struct struct_0 {
struct struct_0 {
  int class_local ();           // { dg-error "" }
  int class_local ();           // { dg-error "" }
  int class_local;              // { dg-error "" }
  int class_local;              // { dg-error "" }
};
};
struct struct_1 {
struct struct_1 {
  int class_local;              // { dg-error "" }
  int class_local;              // { dg-error "" }
  int class_local ();           // { dg-error "" }
  int class_local ();           // { dg-error "" }
};
};
void function_0 ()
void function_0 ()
{
{
        int function_0_local;   // { dg-error "" }
        int function_0_local;   // { dg-error "" }
        extern int function_0_local (); // { dg-error "" }
        extern int function_0_local (); // { dg-error "" }
}
}
void function_1 ()
void function_1 ()
{
{
        int function_1_local ();        // { dg-error "" }
        int function_1_local ();        // { dg-error "" }
        extern int function_1_local;    // { dg-error "" }
        extern int function_1_local;    // { dg-error "" }
}
}
int main () { return 0; }
int main () { return 0; }
 
 

powered by: WebSVN 2.1.0

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