mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-10 19:07:38 +08:00
* g++.dg/parse/parse7.C: New test.
From-SVN: r60805
This commit is contained in:
parent
1a82c94bde
commit
6ec6e2c297
@ -1,3 +1,7 @@
|
||||
2003-01-02 Neil Booth <neil@daikokuya.co.uk>
|
||||
|
||||
* g++.dg/parse/parse7.C: New test.
|
||||
|
||||
2003-01-02 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/2843
|
||||
|
24
gcc/testsuite/g++.dg/parse/parse7.C
Normal file
24
gcc/testsuite/g++.dg/parse/parse7.C
Normal file
@ -0,0 +1,24 @@
|
||||
/* PR c++/3650 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
class class1 {
|
||||
public:
|
||||
explicit class1(double a) { data = a; }
|
||||
double data;
|
||||
};
|
||||
|
||||
class class2 {
|
||||
public:
|
||||
class2(class1 a, float t) { }
|
||||
class2(float t, class1 a) { }
|
||||
};
|
||||
|
||||
int main() {
|
||||
float t2 = 1.5;
|
||||
double pir = 3.14159;
|
||||
// Used to get: error: type specifier omitted for parameter `t2'
|
||||
class2 h(class1(double(pir)), t2);
|
||||
class2 i(class1(pir), t2);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user