[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Protection of snippet in config.h
From: |
bastien ROUCARIES |
Subject: |
Re: Protection of snippet in config.h |
Date: |
Mon, 2 Jan 2012 22:05:42 +0100 |
User-agent: |
KMail/1.13.7 (Linux/3.1.0-1-amd64; KDE/4.6.5; x86_64; ; ) |
Le Monday 2 January 2012 19:06:46, Paul Eggert a écrit :
> On 01/02/12 07:46, Bastien ROUCARIES wrote:
> > Unfortunatly gnulib add some stuff snippet like noreturn in config.h
> > that are not really safe from a fortran point of view.
>
> Could you explain the problem a bit more? I wasn't aware
> that Fortran code used the identifier "_Noreturn".
_Noreturn is safe but I am more affraind by the fact that cpp run in
traditionnal mode and could choke if snippet include C89/C99
preprocessor directive.
>
> I suppose you could do something like this:
>
> #include <config.h>
> #undef _Noreturn
>
> and package this up into a .h file that your Fortran programs
> include.
Yes this could work, but I will prefer something that will avoid snippet if
other language than c,c++ (objc?)
I merely use config.h for project that include c/fortran/c++/python mix and
even verilog ...
My config.h will consist of only #define something 1 guarded by #if #endif that
is safe is all the previous language.
Antoher problem, but not surelly related I use AX_PREFIX_CONFIG_H and I get
__UNUSED_PARAMETER prefixed...
Thanks
Bastien
config.h
Description: Text Data
opencernlibminuit-config.h
Description: Text Data