This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using C++ within a backend?


Alexandre Courbot <Alexandre dot Courbot at lifl dot fr> writes:

[...]

| Problem is, g++ (3.2.3 here) doesn't seem to like gcc's include files. 
| Whenever I include rtl.h for instance, I get:
| 
| ../../gcc-3.2.2-camille/gcc/rtl.h:109: declaration of 
| `rtx_def*rtunion_def::rtx
|    '
| config.h:8: changes meaning of `rtx' from `typedef struct rtx_def*rtx'
| ../../gcc-3.2.2-camille/gcc/rtl.h:110: declaration of `
|    rtvec_def*rtunion_def::rtvec'
| config.h:10: changes meaning of `rtvec' from `typedef struct rtvec_def*rtvec'
| 
| Effectively, line 109 of rtl.h is
|   rtx rtx;
| 
| Which I understand cause problems to g++.

It would be probably better if we could avoid such constructs in GCC
sources.  However, such a chaneg won't be practical for 3.2.3, 3.3.0.
Maybe a project for 3.4 or 3.5.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]