public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/27377] New: false compiler warnings generated in Objective-C code
@ 2006-05-02 6:32 caelian at gmail dot com
2006-05-02 6:43 ` [Bug objc/27377] " caelian at gmail dot com
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: caelian at gmail dot com @ 2006-05-02 6:32 UTC (permalink / raw)
To: gcc-bugs
The following macro
#define GS_INITIALIZED_LOCK(OBJ,CLS) \
(OBJ ? (CLS *) OBJ : (CLS *) [CLS newLockAt: (CLS **)&OBJ])
generates these compiler warnings.
Unicode.m:253: warning: pointer type mismatch in conditional expression
Unicode.m:253: warning: invalid receiver type 'void *'
when called as [GS_INITIALIZED_LOCK(local_lock, GSLazyLock) lock];
local_lock here is declared as a static *GSLazyLock;
As far as we can tell this code should not generate the warnings it does, which
seems to suggest a fault in he objective-c frontend/backend code.
--
Summary: false compiler warnings generated in Objective-C code
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: objc
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: caelian at gmail dot com
GCC host triplet: amd64-unknown-freebsd7.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
@ 2006-05-02 6:43 ` caelian at gmail dot com
2006-05-05 8:01 ` [Bug objc/27377] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: caelian at gmail dot com @ 2006-05-02 6:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from caelian at gmail dot com 2006-05-02 06:42 -------
Created an attachment (id=11356)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11356&action=view)
Unicode.mi file
this is the output generated by compiling the file with -save-temps it should
contain the code that generates the warnings
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.1/4.2 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
2006-05-02 6:43 ` [Bug objc/27377] " caelian at gmail dot com
@ 2006-05-05 8:01 ` pinskia at gcc dot gnu dot org
2006-05-14 22:32 ` mmitchel at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-05 8:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-05-05 08:01 -------
Confirmed, reduced testcase:
#include <objc/Object.h>
@interface NSObject
-lock;
@end
static NSObject *local_lock = (id)0;
void GSSetupEncodingTable(id t)
{
[(local_lock != (id)0 ? local_lock : t) lock];
}
----
For 4.0 and above you can remove the include. And this happens with the next
runtime also.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC host triplet|amd64-unknown-freebsd7.0 |
Keywords| |diagnostic
Known to fail| |4.1.0 4.2.0
Known to work| |4.0.0
Last reconfirmed|0000-00-00 00:00:00 |2006-05-05 08:01:46
date| |
Summary|false compiler warnings |[4.1/4.2 Regression] false
|generated in Objective-C |compiler warnings generated
|code |in Objective-C code
Target Milestone|--- |4.1.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.1/4.2 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
2006-05-02 6:43 ` [Bug objc/27377] " caelian at gmail dot com
2006-05-05 8:01 ` [Bug objc/27377] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-05-14 22:32 ` mmitchel at gcc dot gnu dot org
2006-05-25 2:47 ` mmitchel at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-14 22:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mmitchel at gcc dot gnu dot org 2006-05-14 22:32 -------
P5: Objective-C is not release-critical.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.1/4.2 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (2 preceding siblings ...)
2006-05-14 22:32 ` mmitchel at gcc dot gnu dot org
@ 2006-05-25 2:47 ` mmitchel at gcc dot gnu dot org
2007-02-14 9:39 ` [Bug objc/27377] [4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-25 2:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mmitchel at gcc dot gnu dot org 2006-05-25 02:36 -------
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.1 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.1/4.2/4.3 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (3 preceding siblings ...)
2006-05-25 2:47 ` mmitchel at gcc dot gnu dot org
@ 2007-02-14 9:39 ` mmitchel at gcc dot gnu dot org
2008-07-04 21:22 ` [Bug objc/27377] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14 9:39 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.2 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.2/4.3/4.4 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (4 preceding siblings ...)
2007-02-14 9:39 ` [Bug objc/27377] [4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
@ 2008-07-04 21:22 ` jsm28 at gcc dot gnu dot org
2009-03-14 17:07 ` ayers at gcc dot gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 21:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jsm28 at gcc dot gnu dot org 2008-07-04 21:21 -------
Closing 4.1 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.1/4.2/4.3/4.4 Regression]|[4.2/4.3/4.4 Regression]
|false compiler warnings |false compiler warnings
|generated in Objective-C |generated in Objective-C
|code |code
Target Milestone|4.1.3 |4.2.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.2/4.3/4.4 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (5 preceding siblings ...)
2008-07-04 21:22 ` [Bug objc/27377] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2009-03-14 17:07 ` ayers at gcc dot gnu dot org
2009-03-14 17:11 ` ayers at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ayers at gcc dot gnu dot org @ 2009-03-14 17:07 UTC (permalink / raw)
To: gcc-bugs
--
ayers at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ayers at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.2/4.3/4.4 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (6 preceding siblings ...)
2009-03-14 17:07 ` ayers at gcc dot gnu dot org
@ 2009-03-14 17:11 ` ayers at gcc dot gnu dot org
2009-03-19 7:07 ` ayers at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ayers at gcc dot gnu dot org @ 2009-03-14 17:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ayers at gcc dot gnu dot org 2009-03-14 17:11 -------
Created an attachment (id=17465)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17465&action=view)
patch for build_conditional_expr
This patch for build_conditional_expr is modeled after build_binary_op in that
it skips the diagnostic if the objc_compare_types verifies that the types are
compatible.
If the maintainers wish, I can follow up with a little optimization for the C
front end for both build_conditional_expr and build_binary_op in that
objc_compare_types will only be called for c_dialect_objc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.2/4.3/4.4 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (7 preceding siblings ...)
2009-03-14 17:11 ` ayers at gcc dot gnu dot org
@ 2009-03-19 7:07 ` ayers at gcc dot gnu dot org
2009-03-29 8:10 ` ayers at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ayers at gcc dot gnu dot org @ 2009-03-19 7:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ayers at gcc dot gnu dot org 2009-03-19 07:07 -------
For the record: the official RFA was posted here:
http://gcc.gnu.org/ml/gcc-patches/2009-03/msg00666.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.2/4.3/4.4 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (8 preceding siblings ...)
2009-03-19 7:07 ` ayers at gcc dot gnu dot org
@ 2009-03-29 8:10 ` ayers at gcc dot gnu dot org
2009-03-31 19:35 ` [Bug objc/27377] [4.3/4.4 " jsm28 at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ayers at gcc dot gnu dot org @ 2009-03-29 8:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from ayers at gcc dot gnu dot org 2009-03-29 08:09 -------
Subject: Bug 27377
Author: ayers
Date: Sun Mar 29 08:09:44 2009
New Revision: 145225
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145225
Log:
gcc/
2009-03-00 David Ayers <ayers@fsfe.org>
PR objc/27377
* c-typeck.c (build_conditional_expr): Emit ObjC warnings
by calling objc_compare_types and surpress warnings about
incompatible C pointers that are compatible ObjC pointers.
testsuite/
2009-03-00 David Ayers <ayers@fsfe.org>
PR objc/27377
* objc.dg/conditional-1.m: New tests.
Added:
trunk/gcc/testsuite/objc.dg/conditional-1.m
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-typeck.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.3/4.4 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (9 preceding siblings ...)
2009-03-29 8:10 ` ayers at gcc dot gnu dot org
@ 2009-03-31 19:35 ` jsm28 at gcc dot gnu dot org
2009-04-02 12:41 ` ayers at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 19:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jsm28 at gcc dot gnu dot org 2009-03-31 19:35 -------
Closing 4.2 branch. Removing 4.5 from summary since it appears a patch
has been committed to trunk.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.2/4.3/4.4/4.5 Regression]|[4.3/4.4 Regression] false
|false compiler warnings |compiler warnings generated
|generated in Objective-C |in Objective-C code
|code |
Target Milestone|4.2.5 |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.3/4.4 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (10 preceding siblings ...)
2009-03-31 19:35 ` [Bug objc/27377] [4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2009-04-02 12:41 ` ayers at gcc dot gnu dot org
2009-04-08 12:00 ` ayers at gcc dot gnu dot org
2009-04-08 12:03 ` ayers at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: ayers at gcc dot gnu dot org @ 2009-04-02 12:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from ayers at gcc dot gnu dot org 2009-04-02 12:41 -------
Subject: Bug 27377
Author: ayers
Date: Thu Apr 2 12:40:48 2009
New Revision: 145446
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145446
Log:
gcc/
2009-03-29 David Ayers <ayers@fsfe.org>
PR objc/27377
* c-typeck.c (build_conditional_expr): Emit ObjC warnings
by calling objc_compare_types and surpress warnings about
incompatible C pointers that are compatible ObjC pointers.
gcc/testsuite/
2009-03-29 David Ayers <ayers@fsfe.org>
PR objc/27377
* objc.dg/conditional-1.m: New tests.
Added:
branches/gcc-4_3-branch/gcc/testsuite/objc.dg/conditional-1.m
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/c-typeck.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.3/4.4 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (11 preceding siblings ...)
2009-04-02 12:41 ` ayers at gcc dot gnu dot org
@ 2009-04-08 12:00 ` ayers at gcc dot gnu dot org
2009-04-08 12:03 ` ayers at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: ayers at gcc dot gnu dot org @ 2009-04-08 12:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from ayers at gcc dot gnu dot org 2009-04-08 11:59 -------
Subject: Bug 27377
Author: ayers
Date: Wed Apr 8 11:59:36 2009
New Revision: 145718
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145718
Log:
gcc/
2009-04-08 David Ayers <ayers@fsfe.org>
PR objc/27377
* c-typeck.c (build_conditional_expr): Emit ObjC warnings
by calling objc_compare_types and surpress warnings about
incompatible C pointers that are compatible ObjC pointers.
gcc/testsuite/
2009-04-02 David Ayers <ayers@fsfe.org>
PR objc/27377
* objc.dg/conditional-1.m: New tests.
Added:
branches/gcc-4_4-branch/gcc/testsuite/objc.dg/conditional-1.m
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/c-typeck.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug objc/27377] [4.3/4.4 Regression] false compiler warnings generated in Objective-C code
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
` (12 preceding siblings ...)
2009-04-08 12:00 ` ayers at gcc dot gnu dot org
@ 2009-04-08 12:03 ` ayers at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: ayers at gcc dot gnu dot org @ 2009-04-08 12:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from ayers at gcc dot gnu dot org 2009-04-08 12:03 -------
Since the branch still isn't frozen, I've finally committed this simple fix on
the release branch also.
Regression fixed... PR closed.
--
ayers at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work|4.0.0 |4.0.0 4.3.4 4.4.0 4.5.0
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-04-08 12:03 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-02 6:32 [Bug objc/27377] New: false compiler warnings generated in Objective-C code caelian at gmail dot com
2006-05-02 6:43 ` [Bug objc/27377] " caelian at gmail dot com
2006-05-05 8:01 ` [Bug objc/27377] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-05-14 22:32 ` mmitchel at gcc dot gnu dot org
2006-05-25 2:47 ` mmitchel at gcc dot gnu dot org
2007-02-14 9:39 ` [Bug objc/27377] [4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
2008-07-04 21:22 ` [Bug objc/27377] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2009-03-14 17:07 ` ayers at gcc dot gnu dot org
2009-03-14 17:11 ` ayers at gcc dot gnu dot org
2009-03-19 7:07 ` ayers at gcc dot gnu dot org
2009-03-29 8:10 ` ayers at gcc dot gnu dot org
2009-03-31 19:35 ` [Bug objc/27377] [4.3/4.4 " jsm28 at gcc dot gnu dot org
2009-04-02 12:41 ` ayers at gcc dot gnu dot org
2009-04-08 12:00 ` ayers at gcc dot gnu dot org
2009-04-08 12:03 ` ayers 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).