public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-12 15:08 ` fabien at gcc dot gnu.org
  2011-11-27 21:44 ` fabien at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: fabien at gcc dot gnu.org @ 2010-11-12 15:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

fabien at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |fabien at gcc dot gnu.org


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
  2010-11-12 15:08 ` [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic fabien at gcc dot gnu.org
@ 2011-11-27 21:44 ` fabien at gcc dot gnu.org
  2012-04-15 17:11 ` manu at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: fabien at gcc dot gnu.org @ 2011-11-27 21:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

fabien at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #4 from fabien at gcc dot gnu.org 2011-11-27 21:13:49 UTC ---
(In reply to comment #0)
> Given this code:
> 
> class A {
> protected:
>     int i;
> };
> 
> class B : public A {
> private:
>     using A::i;
> };
> 
> class C : public B {
> public:
>     void f() { A::i = 0; }
> };

As 'i' is referenced through 'this' and is qualified with a nested name
specifier (A), I think we should perform the access lookup directly in A.

The problem seems to be that we do not have the information that 'i' is
referenced through 'this' when checking the access in accessible_p, unless I'm
missing something.

Any idea where to find this information ?


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
  2010-11-12 15:08 ` [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic fabien at gcc dot gnu.org
  2011-11-27 21:44 ` fabien at gcc dot gnu.org
@ 2012-04-15 17:11 ` manu at gcc dot gnu.org
  2012-04-15 17:18 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: manu at gcc dot gnu.org @ 2012-04-15 17:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-04-15 17:09:04 UTC ---
(In reply to comment #4)
> 
> The problem seems to be that we do not have the information that 'i' is
> referenced through 'this' when checking the access in accessible_p, unless I'm
> missing something.
> 
> Any idea where to find this information ?

You should write to Jason directly, as he is probably the only person in the
world that understands the C++ FE well enough to answer this.

(And am I the only one who thinks this is REALLY bad for the future of g++?)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2012-04-15 17:11 ` manu at gcc dot gnu.org
@ 2012-04-15 17:18 ` pinskia at gcc dot gnu.org
  2012-04-15 17:42 ` manu at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-04-15 17:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-04-15 17:17:54 UTC ---
(In reply to comment #5)
> You should write to Jason directly, as he is probably the only person in the
> world that understands the C++ FE well enough to answer this.
> 
> (And am I the only one who thinks this is REALLY bad for the future of g++?)

I don't think it is he is only person who understands the C++ front-end, but
rather he is one of the few who understands the C++ language fully and
understands the interaction between different items of the C++ language.  So
please stop spreading the false hope about G++.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2012-04-15 17:18 ` pinskia at gcc dot gnu.org
@ 2012-04-15 17:42 ` manu at gcc dot gnu.org
  2012-04-15 18:24 ` fabien at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: manu at gcc dot gnu.org @ 2012-04-15 17:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-04-15 17:41:02 UTC ---
(In reply to comment #6)
> (In reply to comment #5)
> > You should write to Jason directly, as he is probably the only person in the
> > world that understands the C++ FE well enough to answer this.
> > 
> > (And am I the only one who thinks this is REALLY bad for the future of g++?)
> 
> I don't think it is he is only person who understands the C++ front-end, but
> rather he is one of the few who understands the C++ language fully and
> understands the interaction between different items of the C++ language.  So
> please stop spreading the false hope about G++.

I am not "spreading false hopes", that sounds like I am hoping that G++ will
fail or some such. If I wanted that, why would I be contributing my free time
to G++?

The question above is not about C++, but about the C++ FE specifically. So,
please, tell us, who else may know the answer besides Jason AND have the time
or interest to answer? Please add them to the CC, so Fabien can fix this bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2012-04-15 17:42 ` manu at gcc dot gnu.org
@ 2012-04-15 18:24 ` fabien at gcc dot gnu.org
  2014-02-06 14:22 ` abel at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: fabien at gcc dot gnu.org @ 2012-04-15 18:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

--- Comment #8 from fabien at gcc dot gnu.org 2012-04-15 18:24:08 UTC ---
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > You should write to Jason directly, as he is probably the only person in the
> > > world that understands the C++ FE well enough to answer this.
> > > 
> > > (And am I the only one who thinks this is REALLY bad for the future of g++?)
> > 
> > I don't think it is he is only person who understands the C++ front-end, but
> > rather he is one of the few who understands the C++ language fully and
> > understands the interaction between different items of the C++ language.  So
> > please stop spreading the false hope about G++.
> 
> I am not "spreading false hopes", that sounds like I am hoping that G++ will
> fail or some such. If I wanted that, why would I be contributing my free time
> to G++?
> 
> The question above is not about C++, but about the C++ FE specifically. So,
> please, tell us, who else may know the answer besides Jason AND have the time
> or interest to answer? Please add them to the CC, so Fabien can fix this bug.

Thanks for your interest manuel, Indeed I've asked Jason via private emails, he
answers the best he can, but unfortunately, it was too late for me to solve it
for 4.7. I'm targeting 4.8...


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2012-04-15 18:24 ` fabien at gcc dot gnu.org
@ 2014-02-06 14:22 ` abel at gcc dot gnu.org
  2014-02-06 16:20 ` fabien at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: abel at gcc dot gnu.org @ 2014-02-06 14:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

Andrey Belevantsev <abel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abel at gcc dot gnu.org,
                   |                            |amonakov at gcc dot gnu.org

--- Comment #9 from Andrey Belevantsev <abel at gcc dot gnu.org> ---
Another test case of the same issue (both clang and icc compile this fine):

namespace ns {
  class Base {
  public:
    int i;
  };
  class Derived : public Base {
    using Base::i;
  };
}
class DerivedDerived : public ns::Derived {
  using ns::Base::i;
};

we get

/tmp/ns.C:4:9: error: ‘int ns::Base::i’ is inaccessible
/tmp/ns.C:10:7: error: within this context

It is indeed rejects-valid but I cannot claim this is a regression as I can't
find the version that did that correctly.  It's 9 years of the original
bugreport, maybe rise a priority?..
>From gcc-bugs-return-442853-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 06 14:32:11 2014
Return-Path: <gcc-bugs-return-442853-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7000 invoked by alias); 6 Feb 2014 14:32:10 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 6948 invoked by uid 48); 6 Feb 2014 14:32:07 -0000
From: "schwab@linux-m68k.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/60092] posix_memalign not recognized to derive alias and alignment info
Date: Thu, 06 Feb 2014 14:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: alias, missed-optimization
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: schwab@linux-m68k.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60092-4-QiW1TpohDS@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60092-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60092-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-02/txt/msg00610.txt.bz2
Content-length: 197

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`092

--- Comment #11 from Andreas Schwab <schwab@linux-m68k.org> ---
If a function is not allowed to change errno this must be explicitly
documented.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2014-02-06 14:22 ` abel at gcc dot gnu.org
@ 2014-02-06 16:20 ` fabien at gcc dot gnu.org
  2014-02-07  5:12 ` abel at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: fabien at gcc dot gnu.org @ 2014-02-06 16:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

--- Comment #10 from fabien at gcc dot gnu.org ---
(In reply to Andrey Belevantsev from comment #9)
> Another test case of the same issue (both clang and icc compile this fine):

It is not the same issue as the protected keyword is not involved. (And Clang
and ICC should be fixed instead, see below).

> 
> namespace ns {
>   class Base {
>   public:
>     int i;
>   };
>   class Derived : public Base {
>     using Base::i;
>   };
> }
> class DerivedDerived : public ns::Derived {
>   using ns::Base::i;
> };
> 
> we get
> 
> /tmp/ns.C:4:9: error: ‘int ns::Base::i’ is inaccessible
> /tmp/ns.C:10:7: error: within this context
> 
> It is indeed rejects-valid but I cannot claim this is a regression as I
> can't find the version that did that correctly.  

The testcase is not valid, as a using declaration shall refer to a direct base
class, which is not the case in 'using ns::Base::i' (the namespace ns does not
seem to be relevant here). It is invalid for a second reason, 'using Base::i'
is declared (implicitly) in a private section, so inaccessible in
DerivedDerived.

> It's 9 years of the
> original bugreport, maybe rise a priority?..

Raising the priority would not make me fix this bug more quickly. This bug is
not a regression, and not a high priority in my opinion. Thought, it is in my
TODO list. I gave it a try two years ago, and it was not obvious to fix. Feel
free to take over if you have more free time than I have.
>From gcc-bugs-return-442869-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 06 16:22:16 2014
Return-Path: <gcc-bugs-return-442869-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 12074 invoked by alias); 6 Feb 2014 16:22:16 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 11973 invoked by uid 48); 6 Feb 2014 16:22:12 -0000
From: "ramana at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/59585] Tests failing due to trailing newline
Date: Thu, 06 Feb 2014 16:22:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ramana at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc resolution target_milestone
Message-ID: <bug-59585-4-qpkOXaEx3k@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59585-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59585-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-02/txt/msg00626.txt.bz2
Content-length: 579

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY585

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |ramana at gcc dot gnu.org
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.9.0

--- Comment #3 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Presumably fixed ?


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2014-02-06 16:20 ` fabien at gcc dot gnu.org
@ 2014-02-07  5:12 ` abel at gcc dot gnu.org
  2014-02-08  8:44 ` harald at gigawatt dot nl
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: abel at gcc dot gnu.org @ 2014-02-07  5:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

--- Comment #11 from Andrey Belevantsev <abel at gcc dot gnu.org> ---
(In reply to fabien from comment #10)

> The testcase is not valid, as a using declaration shall refer to a direct
> base class, which is not the case in 'using ns::Base::i' (the namespace ns
> does not seem to be relevant here). It is invalid for a second reason,
> 'using Base::i' is declared (implicitly) in a private section, so
> inaccessible in DerivedDerived.

Thank you for clarification, we weren't 100% sure whether this is a bug but
decided in favor of it because of icc/clang results...

> 
> > It's 9 years of the
> > original bugreport, maybe rise a priority?..
> 
> Raising the priority would not make me fix this bug more quickly. This bug
> is not a regression, and not a high priority in my opinion. Thought, it is
> in my TODO list. I gave it a try two years ago, and it was not obvious to
> fix. Feel free to take over if you have more free time than I have.

And sorry for the noise here, I just thought that having another test would
help with fixing the issue but of course the invalid test does not help.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2014-02-07  5:12 ` abel at gcc dot gnu.org
@ 2014-02-08  8:44 ` harald at gigawatt dot nl
  2014-02-08 15:57 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: harald at gigawatt dot nl @ 2014-02-08  8:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

Harald van Dijk <harald at gigawatt dot nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |harald at gigawatt dot nl

--- Comment #12 from Harald van Dijk <harald at gigawatt dot nl> ---
Fabien, are you sure that the test case in comment 9 is invalid? C++11 reads

"In a using-declaration used as a member-declaration, the nested-name-specifier
shall name a base class of the class being defined. If such a using-declaration
names a constructor, the nested-name-specifier shall name a direct base class
of the class being defined; otherwise it introduces the set of declarations
found by member name lookup (10.2, 3.4.3.1)."

which makes sense: any inherited member, even from an indirect base class, can
be introduced into the current class, except for an indirect base class's
constructor.

As for "It is invalid for a second reason, 'using Base::i' is declared
(implicitly) in a private section, so inaccessible in DerivedDerived.", the
DerivedDerived using declaration uses a fully qualified ns::Base::i, the
visibility of which should depend on the visibility in Base, not the visibility
in Derived. If the code used ns::Derived::i, then it would make sense to issue
an error, and clang does emit an error in that case.

As for being separate from this bug, a trivial change of that test case to

namespace ns {
  class Base {
  protected:
    int i;
  };
  class Derived : public Base {
    using Base::i;
  };
}
class DerivedDerived : public ns::Derived {
  using ns::Base::i;
};

makes GCC emit

test.cc:4:9: error: ‘int ns::Base::i’ is protected
     int i;
         ^
test.cc:11:7: error: within this context
 class DerivedDerived : public ns::Derived {
       ^

which is exactly the error message that this bug is about. Similarly, changing
the "protected:" to "public:" in the original test case changes the error
message from "protected" to "inaccessible".
>From gcc-bugs-return-443026-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Feb 08 08:45:44 2014
Return-Path: <gcc-bugs-return-443026-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30195 invoked by alias); 8 Feb 2014 08:45:44 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 30161 invoked by uid 48); 8 Feb 2014 08:45:39 -0000
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/60116] [4.8/4.9 Regression] wrong code at -Os on x86_64-linux-gnu in 32-bit mode
Date: Sat, 08 Feb 2014 08:45:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: glisse at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cf_gcctarget bug_status cf_reconfirmed_on component target_milestone short_desc everconfirmed
Message-ID: <bug-60116-4-bw7gnAcTZH@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60116-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60116-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-02/txt/msg00783.txt.bz2
Content-length: 975

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`116

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |i386-linux-gnu
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-08
          Component|tree-optimization           |rtl-optimization
   Target Milestone|---                         |4.9.0
            Summary|wrong code at -Os on        |[4.8/4.9 Regression] wrong
                   |x86_64-linux-gnu in 32-bit  |code at -Os on
                   |mode                        |x86_64-linux-gnu in 32-bit
                   |                            |mode
     Ever confirmed|0                           |1

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
.optimized dump looks ok to me, so either RTL or target.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2014-02-08  8:44 ` harald at gigawatt dot nl
@ 2014-02-08 15:57 ` redi at gcc dot gnu.org
  2021-01-29 12:22 ` anthonysharp15 at gmail dot com
  2021-04-28 18:48 ` anthonysharp15 at gmail dot com
  12 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2014-02-08 15:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
FWIW Harald's analysis looks right to me


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2014-02-08 15:57 ` redi at gcc dot gnu.org
@ 2021-01-29 12:22 ` anthonysharp15 at gmail dot com
  2021-04-28 18:48 ` anthonysharp15 at gmail dot com
  12 siblings, 0 replies; 16+ messages in thread
From: anthonysharp15 at gmail dot com @ 2021-01-29 12:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

Anthony Sharp <anthonysharp15 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anthonysharp15 at gmail dot com

--- Comment #14 from Anthony Sharp <anthonysharp15 at gmail dot com> ---
I believe I accidentally fixed this in my recent PR17314 patch. These testcases
now correctly say "private" instead of protected/inaccessible etc. 

However, I had not anticipated the use of the "using" keyword whilst making
that patch, which means that the place where the error diagnostic points to in
terms of where it was declared private is slightly inaccurate. I will start
working on a patch for this.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
       [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2021-01-29 12:22 ` anthonysharp15 at gmail dot com
@ 2021-04-28 18:48 ` anthonysharp15 at gmail dot com
  12 siblings, 0 replies; 16+ messages in thread
From: anthonysharp15 at gmail dot com @ 2021-04-28 18:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377

--- Comment #15 from Anthony Sharp <anthonysharp15 at gmail dot com> ---
This should now be fixed as part of my patch: 

https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=be246ac2d26e1cb072f205bf97d5eac150220f3f

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
  2005-01-11 16:25 [Bug c++/19377] New: " redi at gcc dot gnu dot org
  2005-01-11 17:08 ` [Bug c++/19377] " pinskia at gcc dot gnu dot org
  2005-01-12 10:46 ` lerdsuwa at gcc dot gnu dot org
@ 2005-05-01  3:34 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-01  3:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-01 03:34 -------
(In reply to comment #0)
> (It actually prints the message twice, but that's PR 19375)
Actually it was not, it was a related case but we still get the message twice, I filed PR 21312 with a 
modifed testcase without the use of using.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2005-01-11 17:08:01         |2005-05-01 03:34:00
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
  2005-01-11 16:25 [Bug c++/19377] New: " redi at gcc dot gnu dot org
  2005-01-11 17:08 ` [Bug c++/19377] " pinskia at gcc dot gnu dot org
@ 2005-01-12 10:46 ` lerdsuwa at gcc dot gnu dot org
  2005-05-01  3:34 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 16+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2005-01-12 10:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2005-01-12 10:46 -------
The bug is simply incorrect error message logic.
The 'protected' comes from the point that 'A::i' is
declared, not the actual access computed.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic
  2005-01-11 16:25 [Bug c++/19377] New: " redi at gcc dot gnu dot org
@ 2005-01-11 17:08 ` pinskia at gcc dot gnu dot org
  2005-01-12 10:46 ` lerdsuwa at gcc dot gnu dot org
  2005-05-01  3:34 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-11 17:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-11 17:08 -------
No this is valid code.  We don't implement full using semantics.

This might be related to PR 6936.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-11 17:08:01
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19377


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-04-28 18:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19377-4@http.gcc.gnu.org/bugzilla/>
2010-11-12 15:08 ` [Bug c++/19377] Using declaration in "private" part causes "protected" diagnostic fabien at gcc dot gnu.org
2011-11-27 21:44 ` fabien at gcc dot gnu.org
2012-04-15 17:11 ` manu at gcc dot gnu.org
2012-04-15 17:18 ` pinskia at gcc dot gnu.org
2012-04-15 17:42 ` manu at gcc dot gnu.org
2012-04-15 18:24 ` fabien at gcc dot gnu.org
2014-02-06 14:22 ` abel at gcc dot gnu.org
2014-02-06 16:20 ` fabien at gcc dot gnu.org
2014-02-07  5:12 ` abel at gcc dot gnu.org
2014-02-08  8:44 ` harald at gigawatt dot nl
2014-02-08 15:57 ` redi at gcc dot gnu.org
2021-01-29 12:22 ` anthonysharp15 at gmail dot com
2021-04-28 18:48 ` anthonysharp15 at gmail dot com
2005-01-11 16:25 [Bug c++/19377] New: " redi at gcc dot gnu dot org
2005-01-11 17:08 ` [Bug c++/19377] " pinskia at gcc dot gnu dot org
2005-01-12 10:46 ` lerdsuwa at gcc dot gnu dot org
2005-05-01  3:34 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).