public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libobjc/18772] New: -fgnu-runtime not working when -E is specified at the same time
@ 2004-12-02  1:33 lars dot sonchocky-helldorf at hamburg dot de
  2004-12-02  1:38 ` [Bug driver/18772] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: lars dot sonchocky-helldorf at hamburg dot de @ 2004-12-02  1:33 UTC (permalink / raw)
  To: gcc-bugs

One of the purposes of the -fgnu-runtime flag is to get hold of the right libobjc header files when 
specified. This does not work when -E is specified at the same time.

Why do I think the mutually exclusion off "-E" and "-fgnu-runtime" is a bug:

The -E option is regularly used by configure scripts to get hold of the preprocessor output of gcc. 
However, this option doesn't seem to work together with  the "-fgnu-runtime" option. I always get 
warnings like (whether an additional '-x objective-c' is specified or not doesn't matter):

cc1: warning: command line option "-fgnu-runtime" is valid for ObjC/ObjC++ but not for C

and in result gcc also includes the wrong header files:

I have stripped down the testcase to the following small program (conftest.c):

#include <objc/objc-api.h>

main()
{

}

If I use gcc on that like:

localhost:~/GNUstep-Darwin/test lars$ /opt/local/bin/gcc -E -x objective-c -fgnu-runtime conftest.c

I get:

cc1: warning: command line option "-fgnu-runtime" is valid for ObjC/ObjC++ but not for C
# 1 "conftest.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "conftest.c"
# 1 "/usr/include/objc/objc-api.h" 1 3 4
# 2 "conftest.c" 2

main()
{

}

which is wrong because /usr/include/objc/objc-api.h got included (which is the objc-api.h of the next-
runtime (default on Darwin)).

If I instead use gcc like:

localhost:~/GNUstep-Darwin/test lars$ /opt/local/bin/gcc -x objective-c -fgnu-runtime -save-temps 
conftest.c

I get a file "conftest.mi" which starts like:

# 1 "conftest.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "conftest.c"
# 1 "/opt/local/bin/../lib/gcc/i686-apple-darwin7.2.1/4.0.0/include-gnu-runtime/objc/objc-api.h" 
1 3 4
# 30 "/opt/local/bin/../lib/gcc/i686-apple-darwin7.2.1/4.0.0/include-gnu-runtime/objc/objc-api.h" 
3 4

Here gcc has included the right (gnu-runtime) objc-api.h


regards, Lars


p.s.:
by the way: Apples gcc (gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)) doesn't warn if it 
gets "-E" and "-fgnu-runtime" at once but it also does the the wrong thing.

-- 
           Summary: -fgnu-runtime not working when -E is specified at the
                    same time
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libobjc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lars dot sonchocky-helldorf at hamburg dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-apple-darwin7.2.1
  GCC host triplet: i686-apple-darwin7.2.1
GCC target triplet: i686-apple-darwin7.2.1


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


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

* [Bug driver/18772] -fgnu-runtime not working when -E is specified at the same time
  2004-12-02  1:33 [Bug libobjc/18772] New: -fgnu-runtime not working when -E is specified at the same time lars dot sonchocky-helldorf at hamburg dot de
@ 2004-12-02  1:38 ` pinskia at gcc dot gnu dot org
  2004-12-02  1:42 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-02  1:38 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
          Component|libobjc                     |driver


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


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

* [Bug driver/18772] -fgnu-runtime not working when -E is specified at the same time
  2004-12-02  1:33 [Bug libobjc/18772] New: -fgnu-runtime not working when -E is specified at the same time lars dot sonchocky-helldorf at hamburg dot de
  2004-12-02  1:38 ` [Bug driver/18772] " pinskia at gcc dot gnu dot org
@ 2004-12-02  1:42 ` pinskia at gcc dot gnu dot org
  2004-12-12 21:32 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-02  1:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-02 01:42 -------
Really you or who ever should not just use -E to test if a header exists, they should be testing if the 
header exists and works (aka -c).

-- 


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


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

* [Bug driver/18772] -fgnu-runtime not working when -E is specified at the same time
  2004-12-02  1:33 [Bug libobjc/18772] New: -fgnu-runtime not working when -E is specified at the same time lars dot sonchocky-helldorf at hamburg dot de
  2004-12-02  1:38 ` [Bug driver/18772] " pinskia at gcc dot gnu dot org
  2004-12-02  1:42 ` pinskia at gcc dot gnu dot org
@ 2004-12-12 21:32 ` pinskia at gcc dot gnu dot org
  2005-01-14 23:46 ` pinskia at gcc dot gnu dot org
  2005-01-14 23:46 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-12 21:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-12 21:32 -------
The GNUstep bug was fixed and really there is no reason to fix this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


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


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

* [Bug driver/18772] -fgnu-runtime not working when -E is specified at the same time
  2004-12-02  1:33 [Bug libobjc/18772] New: -fgnu-runtime not working when -E is specified at the same time lars dot sonchocky-helldorf at hamburg dot de
                   ` (3 preceding siblings ...)
  2005-01-14 23:46 ` pinskia at gcc dot gnu dot org
@ 2005-01-14 23:46 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-14 23:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-14 23:45 -------
Reopening to mark as ...

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WONTFIX                     |
   Target Milestone|---                         |4.0.0


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


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

* [Bug driver/18772] -fgnu-runtime not working when -E is specified at the same time
  2004-12-02  1:33 [Bug libobjc/18772] New: -fgnu-runtime not working when -E is specified at the same time lars dot sonchocky-helldorf at hamburg dot de
                   ` (2 preceding siblings ...)
  2004-12-12 21:32 ` pinskia at gcc dot gnu dot org
@ 2005-01-14 23:46 ` pinskia at gcc dot gnu dot org
  2005-01-14 23:46 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-14 23:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-14 23:46 -------
Fixed.

By:
http://gcc.gnu.org/ml/gcc-patches/2005-01/msg00853.html

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


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


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

end of thread, other threads:[~2005-01-14 23:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-02  1:33 [Bug libobjc/18772] New: -fgnu-runtime not working when -E is specified at the same time lars dot sonchocky-helldorf at hamburg dot de
2004-12-02  1:38 ` [Bug driver/18772] " pinskia at gcc dot gnu dot org
2004-12-02  1:42 ` pinskia at gcc dot gnu dot org
2004-12-12 21:32 ` pinskia at gcc dot gnu dot org
2005-01-14 23:46 ` pinskia at gcc dot gnu dot org
2005-01-14 23:46 ` 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).