public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7646: Inclusion of X11 header files in to a C++ header, causes error messages during compilation.
@ 2002-08-20 13:16 pme
  0 siblings, 0 replies; 3+ messages in thread
From: pme @ 2002-08-20 13:16 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, marcusma, nobody

Synopsis: Inclusion of X11 header files in to a C++ header, causes error messages during compilation.

State-Changed-From-To: open->closed
State-Changed-By: pme
State-Changed-When: Tue Aug 20 12:53:06 2002
State-Changed-Why:
    http://gcc.gnu.org/install/specific.html#*-*-solaris2*

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7646


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

* Re: c++/7646: Inclusion of X11 header files in to a C++ header, causes error messages during compilation.
@ 2002-08-20 12:16 Phil Edwards
  0 siblings, 0 replies; 3+ messages in thread
From: Phil Edwards @ 2002-08-20 12:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/7646; it has been noted by GNATS.

From: Phil Edwards <phil@jaj.com>
To: marcusma@lsl.co.uk
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7646: Inclusion of X11 header files in to a C++ header, causes error messages during compilation.
Date: Tue, 20 Aug 2002 15:03:39 -0400

 On Tue, Aug 20, 2002 at 10:05:39AM -0000, marcusma@lsl.co.uk wrote:
 > >Environment:
 > Solaris 8, running on a SparcUltra 10.
 > >Description:
 > causes the following error during compilation:
 > 
 > /usr/openwin/include/X11/Xlib.h:2099: ISO C++ forbids declaration of `
 >    XSetTransientForHint' with no type
 
 This is a Sun bug, documented in the GCC installation instructions.
 
 
 > What would be useful, is a compiler flag that allows headers
 > to be treated as C headers, not C++. It is imperative that the
 > X11 headers can be included, and that the C++ compiles.
 
 What would be even more useful is if you read the manual.  :-)  This flag
 already exists, and is additionally documented alongside the Sun bug as
 a workaround.
 
 
 -- 
 I would therefore like to posit that computing's central challenge, viz. "How
 not to make a mess of it," has /not/ been met.
                                                  - Edsger Dijkstra, 1930-2002


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

* c++/7646: Inclusion of X11 header files in to a C++ header, causes error messages during compilation.
@ 2002-08-20  4:46 marcusma
  0 siblings, 0 replies; 3+ messages in thread
From: marcusma @ 2002-08-20  4:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7646
>Category:       c++
>Synopsis:       Inclusion of X11 header files in to a C++ header, causes error messages during compilation.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 20 03:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Marcus MacWilliam
>Release:        gcc v3.1
>Organization:
>Environment:
Solaris 8, running on a SparcUltra 10.
>Description:
The following example code from Xlib.h:

extern XSetTransientForHint(
#if NeedFunctionPrototypes
    Display*            /* display */,
    Window              /* w */,
    Window              /* prop_window */
#endif
);

causes the following error during compilation:

/usr/openwin/include/X11/Xlib.h:2099: ISO C++ forbids declaration of `
   XSetTransientForHint' with no type

What would be useful, is a compiler flag that allows headers
to be treated as C headers, not C++. It is imperative that the
X11 headers can be included, and that the C++ compiles.
>How-To-Repeat:
Create a file DummyX11.cpp with the following:

#include <X11/Xlib.h>
#include <stdio>

int main () {
    cout << "Hello" << endl;
}

Compile with the following:

g++ -I/usr/openwin/include DummyX11.cpp.

This will produce the errors.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-08-20 19:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-20 13:16 c++/7646: Inclusion of X11 header files in to a C++ header, causes error messages during compilation pme
  -- strict thread matches above, loose matches on Subject: below --
2002-08-20 12:16 Phil Edwards
2002-08-20  4:46 marcusma

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).