Bug 40184 - g++ incompatible with older version
g++ incompatible with older version
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-10 21:57 EDT by Need Real Name
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-11 10:52:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-05-10 21:57:41 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22.c4eb i686)

Description of problem:
g++ --version
2.96

When it compiles a file including <glade/glade.h>, it reports error as
follows:

g++ -c -g -Wall `gnome-config --cflags gnome gnomeui libglade` main.cpp
In file included from /usr/include/glade/glade.h:50,
                 from main.cpp:2:
/usr/include/glade/glade-xml.h:32:9: malformed #pragma directive
make: *** [main.o] Error 1

The offending pragma (with context) is

#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */

The file compiles fine using g++ version 2.95.2



How reproducible:
Always

Steps to Reproduce:
1. write a simple program including <glade/glade.h> as follows:
// test.cpp
#include <gnome.h>
#include <glade/glade.h>

int main(int argc, char * argv[])
{
return 0;
}

2. compile as follows:
g++ `gnome-config --cflags gnome gnomeui libglade` test.cpp

3.
	

Actual Results:  In file included from /usr/include/glade/glade.h:50,
                 from test.cpp:2:
/usr/include/glade/glade-xml.h:32:9: malformed #pragma directive


Expected Results:  compile successfully

Additional info:

It might be a problem of the header file.  The pragma is weird anyway.
Comment 1 Jakub Jelinek 2001-05-11 10:52:03 EDT
The #pragma is really bogus first of all, so I don't think the preprocessor
was wrong to moan about it.
Anyway, the new preprocessor (present in cpp-2.96-72 and above, including
e.g. the one shipped in 7.1 distribution) will not moan about it.

Note You need to log in before you can comment on or make changes to this bug.