public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
@ 2003-05-25 22:24 ` pinskia@physics.uc.edu
  2003-06-08 18:49 ` pinskia@physics.uc.edu
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-25 22:24 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-05-25 22:14:43
               date|                            |
            Summary|private variables cannot be |[3.3/3.4 regression] private
                   |shadowed in subclasses      |variables cannot be shadowed
                   |                            |in subclasses


------- Additional Comments From pinskia@physics.uc.edu  2003-05-25 22:14 -------
confirmed error on mainline (20030525).
confirmed working on gcc version 2.95.3 20010125 (prerelease).
There fore this is regression from 2.95.3.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
  2003-05-25 22:24 ` [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses pinskia@physics.uc.edu
@ 2003-06-08 18:49 ` pinskia@physics.uc.edu
  2003-06-24  0:04 ` pinskia at physics dot uc dot edu
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-08 18:49 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.3.1


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
  2003-05-25 22:24 ` [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses pinskia@physics.uc.edu
  2003-06-08 18:49 ` pinskia@physics.uc.edu
@ 2003-06-24  0:04 ` pinskia at physics dot uc dot edu
  2003-06-24  0:13 ` pinskia at physics dot uc dot edu
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-24  0:04 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-24 00:04 -------
The error happens also happens in 3.0.4.


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (2 preceding siblings ...)
  2003-06-24  0:04 ` pinskia at physics dot uc dot edu
@ 2003-06-24  0:13 ` pinskia at physics dot uc dot edu
  2003-07-12  0:05 ` pinskia at physics dot uc dot edu
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-24  0:13 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-24 00:13 -------
For some reason on powerpc-apple-darwin6.6 this testcase passes with the mainline (20030623) 
and 3.3.1 (20030616), yes this does not make sense (except that on darwin some things dealing 
with objective-c is different but it even passes with -fgnu-runtime).


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (3 preceding siblings ...)
  2003-06-24  0:13 ` pinskia at physics dot uc dot edu
@ 2003-07-12  0:05 ` pinskia at physics dot uc dot edu
  2003-07-15 17:50 ` bangerth at dealii dot org
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-12  0:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|i686-pc-linux-gnu           |*-*-* except *-*-darwin*


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-12 00:05 -------
This happens every where except on *-*-darwin*.


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (4 preceding siblings ...)
  2003-07-12  0:05 ` pinskia at physics dot uc dot edu
@ 2003-07-15 17:50 ` bangerth at dealii dot org
  2003-07-20  1:12 ` mmitchel at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: bangerth at dealii dot org @ 2003-07-15 17:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From bangerth at dealii dot org  2003-07-15 17:50 -------
A patch for this has been submitted a long time ago here:
  http://gcc.gnu.org/ml/gcc-patches/2002-09/msg01497.html


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (5 preceding siblings ...)
  2003-07-15 17:50 ` bangerth at dealii dot org
@ 2003-07-20  1:12 ` mmitchel at gcc dot gnu dot org
  2003-09-09 21:12 ` shebs at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-07-20  1:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |shebs at apple dot com
   Target Milestone|3.3.1                       |3.3.2


------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-07-20 01:12 -------
Stan Shebs wrote this message:

  http://gcc.gnu.org/ml/gcc/2003-07/msg01168.html

Hopefully, his pondering will yield a decision soon. :-)

In the meantime, I'm postponing this PR until GCC 3.3.2.  If Stan makes a
decision soon we can still put this patch in GCC 3.3.1.


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (6 preceding siblings ...)
  2003-07-20  1:12 ` mmitchel at gcc dot gnu dot org
@ 2003-09-09 21:12 ` shebs at gcc dot gnu dot org
  2003-10-04  7:13 ` steven at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: shebs at gcc dot gnu dot org @ 2003-09-09 21:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


shebs at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |shebs at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


------- Additional Comments From shebs at gcc dot gnu dot org  2003-09-09 21:12 -------
Yes, this change should be made, and would be reasonable for 3.3.2. (It looks
like a side effect of a long-ago reorg by Zack.)


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (7 preceding siblings ...)
  2003-09-09 21:12 ` shebs at gcc dot gnu dot org
@ 2003-10-04  7:13 ` steven at gcc dot gnu dot org
  2003-10-16  2:36 ` mmitchel at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-10-04  7:13 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org, nicola at brainstorm
                   |                            |dot co dot uk


------- Additional Comments From steven at gcc dot gnu dot org  2003-10-04 07:13 -------
Stan,

This Bug 7993 is targeted for 3.3.2, and a patch has been pending for more than
a _year_ now!!! (http://gcc.gnu.org/ml/gcc-patches/2002-09/msg01497.html)

You said about the patch:
"Yes, this change should be made, and would be reasonable for 3.3.2. (It looks
like a side effect of a long-ago reorg by Zack.)"

So, why hasn't the patch been commited (or has it) and the bug been closed?


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (8 preceding siblings ...)
  2003-10-04  7:13 ` steven at gcc dot gnu dot org
@ 2003-10-16  2:36 ` mmitchel at gcc dot gnu dot org
  2003-10-30 10:12 ` pinskia at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-10-16  2:36 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.2                       |3.3.3


------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-10-16 02:36 -------
I have no idea why the patch hasn't been applied, but I'm not going to take
chances.  Postponed until GCC 3.3.3.

Stan, can you at least put this in on the mainline?


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (9 preceding siblings ...)
  2003-10-16  2:36 ` mmitchel at gcc dot gnu dot org
@ 2003-10-30 10:12 ` pinskia at gcc dot gnu dot org
  2003-12-02  0:13 ` zack at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-30 10:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zlaski at apple dot com


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-30 09:36 -------
Zem could you look at this bug, there is a patch that Stan says is okay but he has not 
applied it yet, there is a whole history, it even been okayed for 3.3.3, could you apply it on 
the mainline and the 3.3 branch.
Thanks.


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (10 preceding siblings ...)
  2003-10-30 10:12 ` pinskia at gcc dot gnu dot org
@ 2003-12-02  0:13 ` zack at gcc dot gnu dot org
  2003-12-21 18:40 ` gdr at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: zack at gcc dot gnu dot org @ 2003-12-02  0:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at gcc dot gnu dot org  2003-12-02 00:13 -------
Brief experimentation on x86-linux indicates that mainline still has the issue
and that the patch doesn't fit on mainline anymore. I'd like to ask that this
_not_ be addressed on mainline just yet as I am about to undertake more work on
c-decl.c which may affect the patch.

I don't see any reason why this shouldn't be applied at once to the 3.3 branch.

-- 


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


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (11 preceding siblings ...)
  2003-12-02  0:13 ` zack at gcc dot gnu dot org
@ 2003-12-21 18:40 ` gdr at gcc dot gnu dot org
  2003-12-21 18:50 ` zack at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: gdr at gcc dot gnu dot org @ 2003-12-21 18:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2003-12-21 18:22 -------
Zack, Stan and Zem --

Can anyone of you tell me if I should close this on 3.3.3 as
WONTFIX?  It looks to me that it is taking long to make decision
on this bug and related patch.  

-- Gaby


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zack at codesourcery dot com


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


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (12 preceding siblings ...)
  2003-12-21 18:40 ` gdr at gcc dot gnu dot org
@ 2003-12-21 18:50 ` zack at gcc dot gnu dot org
  2003-12-21 20:03 ` gdr at integrable-solutions dot net
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: zack at gcc dot gnu dot org @ 2003-12-21 18:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at gcc dot gnu dot org  2003-12-21 18:44 -------
As I said in my earlier comment, I don't see any reason why the existing patch
should not be applied at once to the 3.3 branch.  The bug should then be retitled
a 3.4 regression and reassigned to me.

zw

-- 


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


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (13 preceding siblings ...)
  2003-12-21 18:50 ` zack at gcc dot gnu dot org
@ 2003-12-21 20:03 ` gdr at integrable-solutions dot net
  2003-12-29 18:52 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-12-21 20:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2003-12-21 18:58 -------
Subject: Re:  [3.3/3.4 regression] private variables cannot be shadowed in subclasses

"zack at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| As I said in my earlier comment, I don't see any reason why the
| existing patch should not be applied at once to the 3.3 branch.  The
| bug should then be retitled a 3.4 regression and reassigned to me.

Thanks for the prompt reply.

-- Gaby


-- 


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


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (14 preceding siblings ...)
  2003-12-21 20:03 ` gdr at integrable-solutions dot net
@ 2003-12-29 18:52 ` pinskia at gcc dot gnu dot org
  2004-01-14  7:52 ` cvs-commit at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-29 18:52 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


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


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

* [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (15 preceding siblings ...)
  2003-12-29 18:52 ` pinskia at gcc dot gnu dot org
@ 2004-01-14  7:52 ` cvs-commit at gcc dot gnu dot org
  2004-01-14  7:54 ` [Bug objc/7993] [3.4 " gdr at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-14  7:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-01-14 07:52 -------
Subject: Bug 7993

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	gdr@gcc.gnu.org	2004-01-14 07:52:39

Modified files:
	gcc            : ChangeLog 
	gcc/objc       : objc-act.c 
Added files:
	gcc/testsuite/objc.dg: private-1.m private-2.m 

Log message:
	PR objc/7993
	* objc-act.c (is_private): Do not emit the 'instance variable %s
	is declared private' error.
	(is_public): Emit the error after calling is_private.
	(lookup_objc_ivar): If the instance variable is private, return 0
	- the instance variable is invisible here.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.879&r2=1.16114.2.880
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/objc/objc-act.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.160&r2=1.160.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/objc.dg/private-1.m.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/objc.dg/private-2.m.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug objc/7993] [3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (16 preceding siblings ...)
  2004-01-14  7:52 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-14  7:54 ` gdr at gcc dot gnu dot org
  2004-01-14  7:59 ` gdr at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-01-14  7:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-01-14 07:54 -------
Fixed for 3.3.3 (applied patch referenced in audit trail).

Reassigned to ZAck -- per his request

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
            Summary|[3.3/3.4 regression] private|[3.4 regression] private
                   |variables cannot be shadowed|variables cannot be shadowed
                   |in subclasses               |in subclasses
   Target Milestone|3.3.3                       |3.4.0


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


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

* [Bug objc/7993] [3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (17 preceding siblings ...)
  2004-01-14  7:54 ` [Bug objc/7993] [3.4 " gdr at gcc dot gnu dot org
@ 2004-01-14  7:59 ` gdr at gcc dot gnu dot org
  2004-01-14  8:00 ` gdr at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-01-14  7:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-01-14 07:58 -------
Gloops. This is not fixed in 3.4.0 
Looks like one can't set things straight with bugzilla and one
has to click,reload, click, ... for every single of informatiion.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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


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

* [Bug objc/7993] [3.4 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (18 preceding siblings ...)
  2004-01-14  7:59 ` gdr at gcc dot gnu dot org
@ 2004-01-14  8:00 ` gdr at gcc dot gnu dot org
  2004-03-16 22:36 ` [Bug objc/7993] [3.4/3.5 " mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-01-14  8:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-01-14 08:00 -------
balh.

bugzilla seems to require noise traffic for every single piece of information.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|shebs at gcc dot gnu dot org|zack at gcc dot gnu dot org
             Status|REOPENED                    |ASSIGNED
            Version|3.3                         |3.4.0


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


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

* [Bug objc/7993] [3.4/3.5 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (19 preceding siblings ...)
  2004-01-14  8:00 ` gdr at gcc dot gnu dot org
@ 2004-03-16 22:36 ` mmitchel at gcc dot gnu dot org
  2004-06-01  4:19 ` zack at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-16 22:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-16 22:35 -------
As sad as it is that this bug has not yet been fixed, it is still not a
showstopper.  So, I've postponed it until 3.4.1.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.0                       |3.4.1


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


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

* [Bug objc/7993] [3.4/3.5 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (20 preceding siblings ...)
  2004-03-16 22:36 ` [Bug objc/7993] [3.4/3.5 " mmitchel at gcc dot gnu dot org
@ 2004-06-01  4:19 ` zack at gcc dot gnu dot org
  2004-06-01  7:29 ` zack at codesourcery dot com
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: zack at gcc dot gnu dot org @ 2004-06-01  4:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at gcc dot gnu dot org  2004-06-01 04:19 -------
This patch can be fixed in 3.4 without the c-decl.c rewrite.  The existing patch
will work with only minor tweaks.  I am testing 3.4 and mainline patches for
this bug right now.

-- 


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


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

* [Bug objc/7993] [3.4/3.5 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (21 preceding siblings ...)
  2004-06-01  4:19 ` zack at gcc dot gnu dot org
@ 2004-06-01  7:29 ` zack at codesourcery dot com
  2004-06-01  7:34 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 26+ messages in thread
From: zack at codesourcery dot com @ 2004-06-01  7:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at codesourcery dot com  2004-06-01 07:28 -------
Subject: 3.4/HEAD patches for PR 7993


PR 7993 (objc should allow shadowing private instance variables in
subclasses) has been hanging around for a long time now, mainly
because I thought the fix would be more work than "grab the patch out
of the PR and tweak it a little to fit on mainline."  I was wrong.
Appended is the patch - basically the same as the one Nicola Pero
wrote back in 2002 - I'm checking onto mainline and 3.4 branch.
Tested on i686-linux.

zw

2004-06-01  Nicola Pero  <nicola@brainstorm.co.uk>

 	PR objc/7993
        * objc-act.c (is_private): Do not emit the 'instance variable %s
        is declared private' error.
        (is_public): Emit the error after calling is_private.
        (lookup_objc_ivar): If the instance variable is private, return 0
        - the instance variable is invisible here.
testsuite:
        * objc.dg/private-1.m, objc-dg/private-2.m: New testcases.

===================================================================
Index: objc/objc-act.c
--- objc/objc-act.c	15 May 2004 23:07:53 -0000	1.214
+++ objc/objc-act.c	1 Jun 2004 05:28:46 -0000
@@ -6467,15 +6467,9 @@ is_ivar (tree decl_chain, tree ident)
 int
 is_private (tree decl)
 {
-  if (TREE_PRIVATE (decl)
-      && ! is_ivar (CLASS_IVARS (implementation_template), DECL_NAME (decl)))
-    {
-      error ("instance variable `%s' is declared private",
-	     IDENTIFIER_POINTER (DECL_NAME (decl)));
-      return 1;
-    }
-  else
-    return 0;
+  return (TREE_PRIVATE (decl)
+	  && ! is_ivar (CLASS_IVARS (implementation_template),
+			DECL_NAME (decl)));
 }
 
 /* We have an instance variable reference;, check to see if it is public.  */
@@ -6513,7 +6507,14 @@ is_public (tree expr, tree identifier)
 			   == CATEGORY_IMPLEMENTATION_TYPE))
 		      && (CLASS_NAME (objc_implementation_context)
 			  == OBJC_TYPE_NAME (basetype))))
-		return ! is_private (decl);
+		{
+		  int private = is_private (decl);
+
+		  if (private)
+		    error ("instance variable `%s' is declared private",
+			   IDENTIFIER_POINTER (DECL_NAME (decl)));
+		  return !private;
+		}
 
 	      /* The 2.95.2 compiler sometimes allowed C functions to access
 		 non-@public ivars.  We will let this slide for now...  */
@@ -9066,7 +9067,7 @@ lookup_objc_ivar (tree id)
   else if (objc_method_context && (decl = is_ivar (objc_ivar_chain, id)))
     {
       if (is_private (decl))
-	return error_mark_node;
+	return 0;
       else
         return build_ivar_reference (id);
     }
===================================================================
Index: testsuite/objc.dg/private-1.m
--- testsuite/objc.dg/private-1.m	1 Jan 1970 00:00:00 -0000
+++ testsuite/objc.dg/private-1.m	1 Jun 2004 05:28:47 -0000
@@ -0,0 +1,59 @@
+/* Test errors for accessing @private and @protected variables.  */
+/* Author: Nicola Pero <nicola@brainstorm.co.uk>.  */
+/* { dg-do compile } */
+#include <objc/objc.h>
+
+@interface MySuperClass
+{
+@private
+  int private;
+
+@protected
+  int protected;
+
+@public
+  int public;
+}
+- (void) test;
+@end
+
+@implementation MySuperClass
+- (void) test
+{
+  private = 12;   /* Ok  */
+  protected = 12; /* Ok  */
+  public = 12;    /* Ok  */
+}
+@end
+
+
+@interface MyClass : MySuperClass 
+@end
+
+@implementation MyClass
+- (void) test
+{
+  /* Private variables simply don't exist in the subclass.  */
+  private = 12;/* { dg-error "undeclared" } */
+  /* { dg-error "function it appears in" "" { target *-*-* } { 37 } } */
+
+  protected = 12; /* Ok  */
+  public = 12;    /* Ok  */
+}
+@end
+
+int main (void)
+{
+  MyClass *m = nil;
+  
+  if (m != nil)
+    {
+      int access;
+
+      access = m->private;   /* { dg-error "is @private" }  */
+      access = m->protected; /* { dg-error "is @protected" }  */
+      access = m->public;    /* Ok  */
+    }
+
+  return 0;
+}
===================================================================
Index: testsuite/objc.dg/private-2.m
--- testsuite/objc.dg/private-2.m	1 Jan 1970 00:00:00 -0000
+++ testsuite/objc.dg/private-2.m	1 Jun 2004 05:28:47 -0000
@@ -0,0 +1,54 @@
+/* Test warnings for shadowing instance variables.  */
+/* Author: Nicola Pero <nicola@brainstorm.co.uk>.  */
+/* { dg-do compile } */
+#include <objc/objc.h>
+
+@interface MySuperClass
+{
+@private
+  int private;
+
+@protected
+  int protected;
+
+@public
+  int public;
+}
+- (void) test;
+@end
+
+@implementation MySuperClass
+- (void) test
+{
+  /* FIXME: I wonder if the warnings shouldn't be better generated
+     when the variable is declared, rather than used!  */
+  int private = 12;
+  int protected = 12;
+  int public = 12;
+  int a;
+  
+  a = private;    /* { dg-warning "hides instance variable" } */
+  a = protected;  /* { dg-warning "hides instance variable" } */
+  a = public;     /* { dg-warning "hides instance variable" } */
+}
+@end
+
+
+@interface MyClass : MySuperClass 
+@end
+
+@implementation MyClass
+- (void) test
+{
+  int private = 12;
+  int protected = 12;
+  int public = 12;
+  int a;
+
+  /* The private variable can be shadowed without warnings, because
+   * it's invisible, and not accessible, to the subclass!  */
+  a = private;   /* Ok  */
+  a = protected; /* { dg-warning "hides instance variable" } */
+  a = public;    /* { dg-warning "hides instance variable" } */
+}
+@end


-- 


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


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

* [Bug objc/7993] [3.4/3.5 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (22 preceding siblings ...)
  2004-06-01  7:29 ` zack at codesourcery dot com
@ 2004-06-01  7:34 ` cvs-commit at gcc dot gnu dot org
  2004-06-01  7:40 ` cvs-commit at gcc dot gnu dot org
  2004-06-01  7:41 ` zack at gcc dot gnu dot org
  25 siblings, 0 replies; 26+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-01  7:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-01 07:34 -------
Subject: Bug 7993

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	zack@gcc.gnu.org	2004-06-01 07:34:40

Modified files:
	gcc            : ChangeLog 
	gcc/objc       : objc-act.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/objc.dg: private-1.m private-2.m 

Log message:
	2004-06-01  Nicola Pero  <nicola@brainstorm.co.uk>
	
	Fix PR objc/7993:
	* objc-act.c (is_private): Do not emit the 'instance variable %s
	is declared private' error.
	(is_public): Emit the error after calling is_private.
	(lookup_objc_ivar): If the instance variable is private, return 0
	- the instance variable is invisible here.
	testsuite:
	* objc.dg/private-1.m, objc-dg/private-2.m: New testcases.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.463&r2=2.2326.2.464
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/objc/objc-act.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.202.4.1&r2=1.202.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.193&r2=1.3389.2.194
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/objc.dg/private-1.m.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.8.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/objc.dg/private-2.m.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.8.1



-- 


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


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

* [Bug objc/7993] [3.4/3.5 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (23 preceding siblings ...)
  2004-06-01  7:34 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-01  7:40 ` cvs-commit at gcc dot gnu dot org
  2004-06-01  7:41 ` zack at gcc dot gnu dot org
  25 siblings, 0 replies; 26+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-01  7:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-01 07:40 -------
Subject: Bug 7993

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	zack@gcc.gnu.org	2004-06-01 07:40:03

Modified files:
	gcc            : ChangeLog 
	gcc/objc       : objc-act.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/objc.dg: private-1.m private-2.m 

Log message:
	2004-06-01  Nicola Pero  <nicola@brainstorm.co.uk>
	
	Fix PR objc/7993:
	* objc-act.c (is_private): Do not emit the 'instance variable %s
	is declared private' error.
	(is_public): Emit the error after calling is_private.
	(lookup_objc_ivar): If the instance variable is private, return 0
	- the instance variable is invisible here.
	testsuite:
	* objc.dg/private-1.m, objc-dg/private-2.m: New testcases.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3811&r2=2.3812
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/objc/objc-act.c.diff?cvsroot=gcc&r1=1.214&r2=1.215
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3800&r2=1.3801
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/objc.dg/private-1.m.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/objc.dg/private-2.m.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug objc/7993] [3.4/3.5 regression] private variables cannot be shadowed in subclasses
       [not found] <20020920175601.7993.lminder@gmx.net>
                   ` (24 preceding siblings ...)
  2004-06-01  7:40 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-01  7:41 ` zack at gcc dot gnu dot org
  25 siblings, 0 replies; 26+ messages in thread
From: zack at gcc dot gnu dot org @ 2004-06-01  7:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at gcc dot gnu dot org  2004-06-01 07:41 -------
fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2004-06-01  7:41 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20020920175601.7993.lminder@gmx.net>
2003-05-25 22:24 ` [Bug objc/7993] [3.3/3.4 regression] private variables cannot be shadowed in subclasses pinskia@physics.uc.edu
2003-06-08 18:49 ` pinskia@physics.uc.edu
2003-06-24  0:04 ` pinskia at physics dot uc dot edu
2003-06-24  0:13 ` pinskia at physics dot uc dot edu
2003-07-12  0:05 ` pinskia at physics dot uc dot edu
2003-07-15 17:50 ` bangerth at dealii dot org
2003-07-20  1:12 ` mmitchel at gcc dot gnu dot org
2003-09-09 21:12 ` shebs at gcc dot gnu dot org
2003-10-04  7:13 ` steven at gcc dot gnu dot org
2003-10-16  2:36 ` mmitchel at gcc dot gnu dot org
2003-10-30 10:12 ` pinskia at gcc dot gnu dot org
2003-12-02  0:13 ` zack at gcc dot gnu dot org
2003-12-21 18:40 ` gdr at gcc dot gnu dot org
2003-12-21 18:50 ` zack at gcc dot gnu dot org
2003-12-21 20:03 ` gdr at integrable-solutions dot net
2003-12-29 18:52 ` pinskia at gcc dot gnu dot org
2004-01-14  7:52 ` cvs-commit at gcc dot gnu dot org
2004-01-14  7:54 ` [Bug objc/7993] [3.4 " gdr at gcc dot gnu dot org
2004-01-14  7:59 ` gdr at gcc dot gnu dot org
2004-01-14  8:00 ` gdr at gcc dot gnu dot org
2004-03-16 22:36 ` [Bug objc/7993] [3.4/3.5 " mmitchel at gcc dot gnu dot org
2004-06-01  4:19 ` zack at gcc dot gnu dot org
2004-06-01  7:29 ` zack at codesourcery dot com
2004-06-01  7:34 ` cvs-commit at gcc dot gnu dot org
2004-06-01  7:40 ` cvs-commit at gcc dot gnu dot org
2004-06-01  7:41 ` zack 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).