On Wed, Nov 12, 2014 at 3:35 PM, Richard Biener
<richard.guent...@gmail.com> wrote:
> On Wed, Nov 12, 2014 at 2:12 PM, Jakub Jelinek <ja...@redhat.com> wrote:
>> On Wed, Nov 12, 2014 at 01:55:12PM +0100, Basile Starynkevitch wrote:
>>> Hello All,
>>>
>>> Some plugins (including MELT, see http://gcc-melt.org/ for more)
>>> are made of several C++ source files which all include "plugin-version.h"
>>> because they have some C++ code which depends upon the particular version
>>> of GCC.
>>>
>>> So they typically code
>>>
>>>   #if GCCPLUGIN_VERSION >= 4009
>>>      /* code for GCC 4.9 or newer. */
>>>   #else
>>>      /* code for GCC 4.8 */
>>>   #endif /*GCCPLUGIN_VERSION*/
>>
>> Can't you just remember that version in configure of your plugin?
>
> Or fix it properly by also generating a plugin-version.c file with
> the definitions and just provide declarations in plugin-version.h.

And of course not export the too unspecific symbols 'basever'
'datestamp' 'devphase' and 'revision'.  Only export gcc_version.
Which is already available from 'version_string' in version.[ch](!?).  So what's
the point of the extra stuff in plugin-version.h??

Richard.

> Richard.
>
>>         Jakub

Reply via email to