[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f77] Disable C comments in config.h

From: John W. Eaton
Subject: Re: [f77] Disable C comments in config.h
Date: Wed, 5 Sep 2001 11:51:18 -0500

On  5-Sep-2001, Akim Demaille <address@hidden> wrote:

| >>>>> "Denis" == Denis Barbier <address@hidden> writes:
| Denis> On Mon, Sep 03, 2001 at 09:55:34AM +0200, Akim Demaille wrote:
| Denis> [...]  Hi, AIX Fortran compiler dislikes C comments in
| Denis> config.h; it would be nice to have a macro to disable such
| Denis> comments (i mean a documented macro ;)), [...]
| >> Anyway, back to this issue: what do you mean by ``dislikes'':
| >> warns, or chokes?
| Denis> Aborts compilation.
| Any other means to handle this issue?  Such as finding an option to
| have it accept these comments?
| What would you people advise?  Plain and simple removal?  Who should
| do that?  autoheader could, of course, but then since anyway
| config.status adds its signature in a comment, it doesn't change much.
| For the time being, I would strongly suggest outputting say
| config.hdr, and use sed to build config.h from it, stripping the
| comments, for we are certainly hitting something which needs brains
| and work to be done properly..

I'm not sure why autoconf/autoheader should do anything to handle this
situation.  Some Fortran compilers may handle #define, and some may
even allow C-style comments, but there is probably no reason to expect
that they would.  After all, #define and C-style comments are not
valid Fortran.

If there were a similar portable way to handle #define in Fortran, I'd
recommend modifying autoconf/autoheader to optionally generate a file
for that purpose.

If you need to include config.h in your (non) Fortran code, then is it
too much to expect you to post-process the file that configure
generates to make it suitable for your compiler?


--        | Unfortunately we were hoplessly optimistic in 1954 | about the problems of debugging FORTRAN programs.
                      |                                       -- J. Backus

reply via email to

[Prev in Thread] Current Thread [Next in Thread]