This is the mail archive of the 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: GCC 5? (was Re: GCC 4.7.0RC: Mangled names in cc1)

Hi Richard,

Richard Guenther <> skribis:

> 2012/3/19 Ludovic CourtÃs <>:


>> In the example of name mangling, Iâd just have wrapped in âextern "C"â
>> all the headers listed in âPLUGIN_HEADERSâ in gcc/ ÂThe
>> rationale is that it simplifies plug-in maintenance, while not impeding
>> development work in 4.7.
> Well, that's _all_ headers.  Basically.

Well, these headers get installed, and they get installed to be actually
used, donât they?  :-)

> And exactly the problem.  There will be never even API compatibility
> between major releases of GCC with the current plugin "API".

My experience is more encouraging: between 4.5 and 4.6, I was only hit
by a couple of tree.h declarations found in one and not the other.

When switching to 4.7, the main problem was mangled names, and all the
problems that making my code compilable with g++ entails.  Other issues
were the removal of the âbuilt_in_declsâ array, and the new
âaffects_type_identityâ field of âattribute_specâ.

All this is summarized in the Autoconf macro I use [0]:

  dnl   build_call_expr_loc_array -- not in GCC 4.5.x; appears in 4.6
  dnl   build_call_expr_loc_vec   -- likewise
  dnl   build_array_ref           -- present but undeclared in 4.6.1
  dnl   build_zero_cst            -- not in GCC 4.5.x; appears in 4.6
  dnl   builtin_decl_explicit     -- new in 4.7, replaces `built_in_decls'
  dnl   .affects_type_identity    -- new field in 4.7

Then again, my plug-in is relatively small, and uses a small part of GCC.
Plug-ins with a larger API footprint may have more problems, of course.



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