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++.law/] [ctors17.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  }
// GROUPS passed constructors
// GROUPS passed constructors
// ctor file
// ctor file
// Message-Id: <199306151813.gD28471@mail.Germany.EU.net>
// Message-Id: <199306151813.gD28471@mail.Germany.EU.net>
// From: stephan@ifconnection.de (Stephan Muehlstrasser)
// From: stephan@ifconnection.de (Stephan Muehlstrasser)
// Subject: gcc 2.4.3.1: illegal constructor call not rejected
// Subject: gcc 2.4.3.1: illegal constructor call not rejected
// Date: Tue, 15 Jun 1993 18:34:14 +0200 (MET DST)
// Date: Tue, 15 Jun 1993 18:34:14 +0200 (MET DST)
#include 
#include 
class X : public std::ifstream { // { dg-message "note" } candidate
class X : public std::ifstream { // { dg-message "note" } candidate
    public:
    public:
      X(int a, const char *b) {} // { dg-message "note" } candidate
      X(int a, const char *b) {} // { dg-message "note" } candidate
};
};
int main()
int main()
{
{
    X *y = new X(10, "123");
    X *y = new X(10, "123");
    // the compiler must reject this constructor call:
    // the compiler must reject this constructor call:
    X *x = new X("abc");// { dg-error "match" }
    X *x = new X("abc");// { dg-error "match" }
}
}
 
 

powered by: WebSVN 2.1.0

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