diff options
author | Kelley Cook <kcook@gcc.gnu.org> | 2004-07-20 00:34:03 +0000 |
---|---|---|
committer | R. Kelley Cook <kcook@gcc.gnu.org> | 2004-07-20 00:34:03 +0000 |
commit | e05de6f246b5bb905229c0f9365010d7adf15bdc (patch) | |
tree | f180e44ddbb4dc8ab183fc78e11e922afb93048f /gcc/testsuite | |
parent | a57c6d6b633f16420c6bf17996af525c106184bf (diff) | |
download | gcc-e05de6f246b5bb905229c0f9365010d7adf15bdc.zip gcc-e05de6f246b5bb905229c0f9365010d7adf15bdc.tar.gz gcc-e05de6f246b5bb905229c0f9365010d7adf15bdc.tar.bz2 |
Remove DOS style trailing Carriage Returns
From-SVN: r84941
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/lookup/java1.C | 136 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/lookup/java2.C | 94 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/crash-2.C | 26 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/casting-operator2.C | 54 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/dtor3.C | 32 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/typename6.C | 34 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/dependent-expr4.C | 30 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/nontype3.C | 74 |
9 files changed, 247 insertions, 240 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b5a322c..caadf49 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2004-07-19 Kelley Cook <kcook@gcc.gnu.org> + + * g++.dg/lookup/java1.C, g++.dg/lookup/java2.C, g++.dg/other/crash-2.C, + g++.dg/parse/casting-operator2.C, g++.dg/parse/dtor3.C, + g++.dg/parse/typename6.C, g++.dg/template/dependent-expr4.C, + g++.dg/template/nontype3.C: Remove trailing CR from tests. + 2004-07-18 Mark Mitchell <mark@codesourcery.com> PR c++/16623 diff --git a/gcc/testsuite/g++.dg/lookup/java1.C b/gcc/testsuite/g++.dg/lookup/java1.C index 270910d..0d9b22e 100644 --- a/gcc/testsuite/g++.dg/lookup/java1.C +++ b/gcc/testsuite/g++.dg/lookup/java1.C @@ -1,68 +1,68 @@ -// { dg-do compile }
-// { dg-options "-fdollars-in-identifiers" }
-// Origin: Giovanni Bajo <giovannibajo at libero dot it>
-// Make sure that Java special functions can be called correctly.
-
-extern "Java"
-{
- typedef __java_int jint;
- namespace java
- {
- namespace lang
- {
- class Class;
- class Object;
- class Throwable {};
- class Foo;
- }
- }
-}
-
-typedef struct java::lang::Object* jobject;
-typedef struct java::lang::Throwable* jthrowable;
-typedef class java::lang::Class* jclass;
-using java::lang::Foo;
-
-class Foo : public java::lang::Throwable
-{
-public:
- static ::java::lang::Class class$;
-};
-
-
-/*
- * Step 1: no declarations. A declaration for _Jv_Throw is created.
- */
-
-void Bar1(void)
-{
- Foo* f = new java::lang::Foo; // { dg-error "call to Java constructor" }
- throw (f);
-}
-
-
-/*
- * Step 2: constructor declaration
- */
-
-extern "C" jobject _Jv_AllocObject (jclass) __attribute__((__malloc__));
-
-void Bar2(void)
-{
- Foo* f = new java::lang::Foo;
- throw (f);
-}
-
-
-/*
- * Step 3: overloads
- */
-
-jobject _Jv_AllocObject (jclass, jint, float) __attribute__((__malloc__));
-void _Jv_Throw (int, float) __attribute__ ((__noreturn__));
-
-void Bar3(void)
-{
- Foo* f = new java::lang::Foo; // { dg-error "should never be overloaded" }
- throw (f); // { dg-error "should never be overloaded" }
-}
+// { dg-do compile } +// { dg-options "-fdollars-in-identifiers" } +// Origin: Giovanni Bajo <giovannibajo at libero dot it> +// Make sure that Java special functions can be called correctly. + +extern "Java" +{ + typedef __java_int jint; + namespace java + { + namespace lang + { + class Class; + class Object; + class Throwable {}; + class Foo; + } + } +} + +typedef struct java::lang::Object* jobject; +typedef struct java::lang::Throwable* jthrowable; +typedef class java::lang::Class* jclass; +using java::lang::Foo; + +class Foo : public java::lang::Throwable +{ +public: + static ::java::lang::Class class$; +}; + + +/* + * Step 1: no declarations. A declaration for _Jv_Throw is created. + */ + +void Bar1(void) +{ + Foo* f = new java::lang::Foo; // { dg-error "call to Java constructor" } + throw (f); +} + + +/* + * Step 2: constructor declaration + */ + +extern "C" jobject _Jv_AllocObject (jclass) __attribute__((__malloc__)); + +void Bar2(void) +{ + Foo* f = new java::lang::Foo; + throw (f); +} + + +/* + * Step 3: overloads + */ + +jobject _Jv_AllocObject (jclass, jint, float) __attribute__((__malloc__)); +void _Jv_Throw (int, float) __attribute__ ((__noreturn__)); + +void Bar3(void) +{ + Foo* f = new java::lang::Foo; // { dg-error "should never be overloaded" } + throw (f); // { dg-error "should never be overloaded" } +} diff --git a/gcc/testsuite/g++.dg/lookup/java2.C b/gcc/testsuite/g++.dg/lookup/java2.C index f3c81f4..26fd369 100644 --- a/gcc/testsuite/g++.dg/lookup/java2.C +++ b/gcc/testsuite/g++.dg/lookup/java2.C @@ -1,47 +1,47 @@ -// { dg-do compile }
-// { dg-options "-fdollars-in-identifiers" }
-// Origin: Giovanni Bajo <giovannibajo at libero dot it>
-// Make sure that Java special functions can be called correctly.
-// (continue from java1.C)
-
-extern "Java"
-{
- typedef __java_int jint;
- namespace java
- {
- namespace lang
- {
- class Class;
- class Object;
- class Throwable {};
- class Foo;
- }
- }
-}
-
-typedef struct java::lang::Object* jobject;
-typedef struct java::lang::Throwable* jthrowable;
-typedef class java::lang::Class* jclass;
-using java::lang::Foo;
-
-class Foo : public java::lang::Throwable
-{
-public:
- static ::java::lang::Class class$;
-};
-
-/*
- * Step 4: Manual declaration of _Jv_Throw
- * This is the last case we need to test. In the other file we're testing
- * the compiler is able to generate an artifical declaration for this
- * function, so we need to test here if it works with a normal declaration.
- */
-
-extern "C" jobject _Jv_AllocObject (jclass) __attribute__((__malloc__));
-extern "C" void _Jv_Throw (jthrowable) __attribute__ ((__noreturn__));
-
-void Bar4(void)
-{
- Foo* f = new java::lang::Foo;
- throw (f);
-}
+// { dg-do compile } +// { dg-options "-fdollars-in-identifiers" } +// Origin: Giovanni Bajo <giovannibajo at libero dot it> +// Make sure that Java special functions can be called correctly. +// (continue from java1.C) + +extern "Java" +{ + typedef __java_int jint; + namespace java + { + namespace lang + { + class Class; + class Object; + class Throwable {}; + class Foo; + } + } +} + +typedef struct java::lang::Object* jobject; +typedef struct java::lang::Throwable* jthrowable; +typedef class java::lang::Class* jclass; +using java::lang::Foo; + +class Foo : public java::lang::Throwable +{ +public: + static ::java::lang::Class class$; +}; + +/* + * Step 4: Manual declaration of _Jv_Throw + * This is the last case we need to test. In the other file we're testing + * the compiler is able to generate an artifical declaration for this + * function, so we need to test here if it works with a normal declaration. + */ + +extern "C" jobject _Jv_AllocObject (jclass) __attribute__((__malloc__)); +extern "C" void _Jv_Throw (jthrowable) __attribute__ ((__noreturn__)); + +void Bar4(void) +{ + Foo* f = new java::lang::Foo; + throw (f); +} diff --git a/gcc/testsuite/g++.dg/other/crash-2.C b/gcc/testsuite/g++.dg/other/crash-2.C index 3a19f3b..961a18a 100644 --- a/gcc/testsuite/g++.dg/other/crash-2.C +++ b/gcc/testsuite/g++.dg/other/crash-2.C @@ -1,13 +1,13 @@ -// { dg-do compile }
-// { dg-options "-finline -finline-functions" }
-// Contributed by Hans Buchmann <hans dot buchmann at fhso dot ch>
-// PR c++/14033: ICE while inlining a function with incomplete parameter
-
-struct A; // { dg-error "forward declaration" }
-void foo(A a) {} // { dg-error "incomplete" }
-struct A {};
-
-void bar(void)
-{
- foo(A());
-}
+// { dg-do compile } +// { dg-options "-finline -finline-functions" } +// Contributed by Hans Buchmann <hans dot buchmann at fhso dot ch> +// PR c++/14033: ICE while inlining a function with incomplete parameter + +struct A; // { dg-error "forward declaration" } +void foo(A a) {} // { dg-error "incomplete" } +struct A {}; + +void bar(void) +{ + foo(A()); +} diff --git a/gcc/testsuite/g++.dg/parse/casting-operator2.C b/gcc/testsuite/g++.dg/parse/casting-operator2.C index 31f14b3..008fa62 100644 --- a/gcc/testsuite/g++.dg/parse/casting-operator2.C +++ b/gcc/testsuite/g++.dg/parse/casting-operator2.C @@ -1,27 +1,27 @@ -// { dg-do compile }
-// Contributed by Martin Loewis <loewis at informatik dot hu-berlin dot de>
-// PR c++/8856: Make sure template conversion operators are not parsed as
-// template names.
-
-struct K {};
-template <bool> struct K2 {};
-
-template <class T> struct A {
- template <class U> operator U() { return U(); }
-};
-
-int main() {
- A<double> a;
-
- (void)a.operator int();
- (void)a.operator double();
- (void)a.operator K2<true>();
- (void)a.A<double>::operator int();
- (void)a.A<double>::operator double();
- (void)a.A<double>::operator K2<true>();
-
- (void)a.operator double<int>(); // { dg-error "not a template" }
- (void)a.operator K<int>(); // { dg-error "not a template" }
- (void)a.A<double>::operator double<int>(); // { dg-error "not a template" }
- (void)a.A<double>::operator K<int>(); // { dg-error "not a template" }
-}
+// { dg-do compile } +// Contributed by Martin Loewis <loewis at informatik dot hu-berlin dot de> +// PR c++/8856: Make sure template conversion operators are not parsed as +// template names. + +struct K {}; +template <bool> struct K2 {}; + +template <class T> struct A { + template <class U> operator U() { return U(); } +}; + +int main() { + A<double> a; + + (void)a.operator int(); + (void)a.operator double(); + (void)a.operator K2<true>(); + (void)a.A<double>::operator int(); + (void)a.A<double>::operator double(); + (void)a.A<double>::operator K2<true>(); + + (void)a.operator double<int>(); // { dg-error "not a template" } + (void)a.operator K<int>(); // { dg-error "not a template" } + (void)a.A<double>::operator double<int>(); // { dg-error "not a template" } + (void)a.A<double>::operator K<int>(); // { dg-error "not a template" } +} diff --git a/gcc/testsuite/g++.dg/parse/dtor3.C b/gcc/testsuite/g++.dg/parse/dtor3.C index 000cb3c..3041ae4 100644 --- a/gcc/testsuite/g++.dg/parse/dtor3.C +++ b/gcc/testsuite/g++.dg/parse/dtor3.C @@ -1,16 +1,16 @@ -// { dg-do compile }
-// Contributed by Wolfgang Bangerth <bangerth at dealii dot org>
-// PR c++/12335: Make sure we don't ICE on the qualified-id form of a
-// destructor call.
-
-struct Y {
- ~Y() {} // { dg-bogus "note" "implemented DR272" { xfail *-*-* } }
-};
-
-struct X : Y {
- ~X() {} // { dg-bogus "note" "implemented DR272" { xfail *-*-* } }
- void f() {
- X::~X(); // { dg-bogus "" "implemented DR272" { xfail *-*-* } }
- Y::~Y(); // { dg-bogus "" "implemented DR272" { xfail *-*-* } }
- }
-};
+// { dg-do compile } +// Contributed by Wolfgang Bangerth <bangerth at dealii dot org> +// PR c++/12335: Make sure we don't ICE on the qualified-id form of a +// destructor call. + +struct Y { + ~Y() {} // { dg-bogus "note" "implemented DR272" { xfail *-*-* } } +}; + +struct X : Y { + ~X() {} // { dg-bogus "note" "implemented DR272" { xfail *-*-* } } + void f() { + X::~X(); // { dg-bogus "" "implemented DR272" { xfail *-*-* } } + Y::~Y(); // { dg-bogus "" "implemented DR272" { xfail *-*-* } } + } +}; diff --git a/gcc/testsuite/g++.dg/parse/typename6.C b/gcc/testsuite/g++.dg/parse/typename6.C index a0f5e39..dc458be 100644 --- a/gcc/testsuite/g++.dg/parse/typename6.C +++ b/gcc/testsuite/g++.dg/parse/typename6.C @@ -1,17 +1,17 @@ -// { dg-do compile }
-// Contributed by Matt Austern <austern at apple dot com>
-// PR c++/13407: Gracefully handle keyword typename in base class specifier.
-
-struct A { };
-struct B { typedef A Type; };
-
-template <typename T>
-struct X :
- public typename T::Type // { dg-error "not allowed in this context" }
-{ };
-
-X<B> x;
-
-struct C :
- public typename A // { dg-error "not allowed outside of templates" }
-{ };
+// { dg-do compile } +// Contributed by Matt Austern <austern at apple dot com> +// PR c++/13407: Gracefully handle keyword typename in base class specifier. + +struct A { }; +struct B { typedef A Type; }; + +template <typename T> +struct X : + public typename T::Type // { dg-error "not allowed in this context" } +{ }; + +X<B> x; + +struct C : + public typename A // { dg-error "not allowed outside of templates" } +{ }; diff --git a/gcc/testsuite/g++.dg/template/dependent-expr4.C b/gcc/testsuite/g++.dg/template/dependent-expr4.C index 8e29654..b36c872 100644 --- a/gcc/testsuite/g++.dg/template/dependent-expr4.C +++ b/gcc/testsuite/g++.dg/template/dependent-expr4.C @@ -1,15 +1,15 @@ -// { dg-do compile }
-// Origin: jbrandmeyer at users dot sourceforge dot net
-// PR c++/12573: COMPONENT_REFs must be inspected for dependness.
-// Or, more specifically OFFSETOF.
-
-template <bool> struct S;
-
-template <typename K> struct Y {
- int x;
-};
-
-template <class T> struct Z {
- S< (bool)(__builtin_offsetof (Y<T>*, x) == 0) >
- s;
-};
+// { dg-do compile } +// Origin: jbrandmeyer at users dot sourceforge dot net +// PR c++/12573: COMPONENT_REFs must be inspected for dependness. +// Or, more specifically OFFSETOF. + +template <bool> struct S; + +template <typename K> struct Y { + int x; +}; + +template <class T> struct Z { + S< (bool)(__builtin_offsetof (Y<T>*, x) == 0) > + s; +}; diff --git a/gcc/testsuite/g++.dg/template/nontype3.C b/gcc/testsuite/g++.dg/template/nontype3.C index 15a204f..5f24562 100644 --- a/gcc/testsuite/g++.dg/template/nontype3.C +++ b/gcc/testsuite/g++.dg/template/nontype3.C @@ -1,37 +1,37 @@ -// { dg-do compile }
-// Origin: <drow at gcc dot gnu dot org>,
-// <giovannibajo at gcc dot gnu dot org>
-// c++/13243: Template parameters of non integral or enumeration type can't be
-// used for integral constant expressions. ADDR_EXPR and INDIRECT_REF are
-// invalid too.
-
-template <int T> class foo {};
-template <int *T> class bar {};
-
-template <int *PI>
-void dep5(bar<PI> *);
-
-template <int *PI>
-void dep6(bar<PI+1> *); // { dg-error "" "integral or enumeration" }
-
-template <int I>
-void dep7(bar<I+1> *);
-
-template <int *PI>
-void dep8(foo< *PI > *); // { dg-error "" "integral or enumeration" }
-
-template <int PI[1]>
-void dep9(foo< *PI > *); // { dg-error "" "integral or enumeration" }
-
-template <int PI[1]>
-void dep9a(foo< sizeof(*PI) > *);
-
-template <int PI[1]>
-void dep10(foo< PI[0] > *); // { dg-error "" "integral or enumeration" }
-
-template <int I>
-void dep11(foo< *&I > *); // { dg-error "" "constant-expression" }
-
-template <int I>
-void dep12(foo< (&I)[4] > *); // { dg-error "" "constant-expression" }
-
+// { dg-do compile } +// Origin: <drow at gcc dot gnu dot org>, +// <giovannibajo at gcc dot gnu dot org> +// c++/13243: Template parameters of non integral or enumeration type can't be +// used for integral constant expressions. ADDR_EXPR and INDIRECT_REF are +// invalid too. + +template <int T> class foo {}; +template <int *T> class bar {}; + +template <int *PI> +void dep5(bar<PI> *); + +template <int *PI> +void dep6(bar<PI+1> *); // { dg-error "" "integral or enumeration" } + +template <int I> +void dep7(bar<I+1> *); + +template <int *PI> +void dep8(foo< *PI > *); // { dg-error "" "integral or enumeration" } + +template <int PI[1]> +void dep9(foo< *PI > *); // { dg-error "" "integral or enumeration" } + +template <int PI[1]> +void dep9a(foo< sizeof(*PI) > *); + +template <int PI[1]> +void dep10(foo< PI[0] > *); // { dg-error "" "integral or enumeration" } + +template <int I> +void dep11(foo< *&I > *); // { dg-error "" "constant-expression" } + +template <int I> +void dep12(foo< (&I)[4] > *); // { dg-error "" "constant-expression" } + |