On Sun, May 12, 2019 at 10:36:09PM +0300, Janne Blomqvist wrote: > On Sun, May 12, 2019 at 11:29 AM Janne Blomqvist > <blomqvist.ja...@gmail.com> wrote: > > > > On Sun, May 12, 2019 at 11:06 AM Thomas Koenig <tkoe...@netcologne.de> > > wrote: > > > (I thought for a second about guarding about double inclusion, but > > > including prototypes twice is harmless, and this should be the > > > user's responsibility). > > > > I thought about adding include guards as well, but the problem is that > > we don't know which name the end user wants to save the output as. > > But, we can of course use the source file name instead of the usual > header name for the include guard. Like in the attached patch. Ok for
There are many characters that can appear in filenames and can't appear in macro names, /, <, >, :, ;, many others. Either you need to replace them all with _ but then you risk collisions, or add some way how to encode the characters you can't put in directly (say _7b etc.), or instead use _GFORTRAN_GUARD_<crc or sha256sum etc. of filename> Jakub