diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.brendan/overload5.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.brendan/overload5.C | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/overload5.C b/gcc/testsuite/g++.old-deja/g++.brendan/overload5.C new file mode 100644 index 000000000..d5c25dbbe --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.brendan/overload5.C @@ -0,0 +1,23 @@ +// { dg-do assemble } +// GROUPS passed overloading +class Foo +{ +public: + int operator << (const signed char&); + int operator << (const unsigned char&); + int operator << (const short&); + int operator << (const unsigned short&); + int operator << (const long&); + int operator << (const unsigned long&); +}; + +int main () +{ + Foo fd; + + // We fixed convert_harshness_ansi so it considers the call to + // <<(const signed char&) to be a trivial conversion. It used + // to always make it a standard conversion, which made it conflict + // with <<(const unsigned char &), which is really a std conv. + fd << (signed char) 0; +} |