Bug 40184 - g++ incompatible with older version
Summary: g++ incompatible with older version
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-05-11 01:57 UTC by Need Real Name
Modified: 2007-04-18 16:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-05-11 14:52:08 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2001-05-11 01:57:41 UTC
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 14:52:03 UTC
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.