This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix C++ testsuite failures.


Gabriel Dos Reis wrote:
Jason Merrill <jason@redhat.com> writes:

| Gabriel Dos Reis wrote:
| > "Lee Millward" <lee.millward@gmail.com> writes:
| > | Index: g++.dg/init/ctor4.C
| > | ===================================================================
| > | --- g++.dg/init/ctor4.C (revision 111789)
| > | +++ g++.dg/init/ctor4.C (working copy)
| > | @@ -8,7 +8,7 @@ public:
| > | | class bar: public foo {// { dg-error "uninitialized" }
| > | private:
| > | - int &a;
| > | + int &a; // { dg-warning "non-static reference" }
| > Likewise.
| | This testcase is testing for the error caused by trying to construct
| an object of a type with an unitialized non-static reference, so
| adding the dg-warning is the right solution for this test.


Hmm, I'm unclear. If we're testing for that particular aspect,
should not we actually use dg-error?

We already did, two lines above. That error is given when we actually try to construct an object. The new warning gives the user a heads-up that they will have problems if they ever do try to construct an object, which seems reasonable to me.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]