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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [missed-error2.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do assemble  }
2
// GROUPS passed missed-error
3
// missed-error file
4
// From: ndc!don@csvax.cs.caltech.edu (Don Erway)
5
// Date:     Thu, 21 May 92 15:40:45 PDT
6
// Subject:  More on [g++ 2.1 : overloaded function selection incorrect]
7
// Message-ID: <9205212240.AA17934@ndc.com>
8
 
9
#include 
10
 
11
inline int max(int a, int b) {return a > b ? a : b;}; // { dg-error "" } candidate
12
inline double max(double a, double b) {return a > b ? a : b;}; // { dg-error "" } candidate
13
 
14
int main() {
15
   static void foo(int i, int j, double x, double y) ;// { dg-error "" } .*
16
 
17
   foo(4, -37, 14.39, 14.38);
18
}
19
 
20
// 971006 we no longer give an error for this since we emit a hard error
21
// about the declaration above
22
static void foo(int i, int j, double x, double y) {
23
 
24
   std::cout << "Max(int): " << max(i,j) << " Max(double): " <<
25
max(x,y) << '\n';
26
   std::cout << "Max(int, double): " << max(i, y) << '\n';// { dg-error "" }
27
}
28
 

powered by: WebSVN 2.1.0

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