[Openmp-dev] Small nit on # endif changes

Hahnfeld, Jonas via Openmp-dev openmp-dev at lists.llvm.org
Fri Jun 17 01:17:29 PDT 2016


I haven’t tested those cpps but I think it's consistent at least in the OpenMP runtime, just have a look into kmp.h...

> -----Original Message-----
> From: C Bergström [mailto:cbergstrom at pathscale.com]
> Sent: Friday, June 17, 2016 10:13 AM
> To: Hahnfeld, Jonas
> Cc: LLVM-OpenMP (openmp-dev at lists.llvm.org)
> Subject: Re: [Openmp-dev] Small nit on # endif changes
> 
> Does it work with this?
> Net bsd has their own cpp which is standalone -
> ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/tradcpp/README.ht
> ml
> 
> NetBSD may be a far off target, but iirc FreeBSD was thinking about using it.
> (OpenSolaris may also be another target to import that for licensing reasons
> and "we" have sent them a few patches implementing various pieces)
> -----------
> If nothing else - is this consistent in the project and is this the same style
> which llvm/clang generally uses. If it will be consistently used everywhere it's
> no problem, but if it's just drive-by style changes, it breaks readability.
> 
> 
> On Fri, Jun 17, 2016 at 2:47 PM, Hahnfeld, Jonas <Hahnfeld at itc.rwth-
> aachen.de> wrote:
> > Hi,
> >
> > Although your message was really hard to understand I think I finally got it:
> You mean the additional whitespace between '#' and 'endif', right?
> > (to which commit or patch are you referring?)
> >
> > I think this should be fine, even GCC in traditional mode will do it right:
> > "Preprocessing directives are recognized only when their leading ‘#’
> appears in the first column. There can be no whitespace between the
> beginning of the line and the ‘#’, but whitespace can follow the ‘#’."
> > (from
> > https://gcc.gnu.org/onlinedocs/cpp/Traditional-miscellany.html#Traditi
> > onal-miscellany, note the last 'but')
> >
> > Greetings,
> > Jonas
> >
> >> -----Original Message-----
> >> From: Openmp-dev [mailto:openmp-dev-bounces at lists.llvm.org] On
> Behalf
> >> Of C Bergström via Openmp-dev
> >> Sent: Friday, June 17, 2016 12:02 AM
> >> To: openmp-dev
> >> Subject: [Openmp-dev] Small nit on # endif changes
> >>
> >> I'm not 100% certain if old cpp will accept this fwiw. I vaguely
> >> remember some discussion on comp.compilers about this.
> >>
> >> I also don't really like this style.. so if anyone doesn't feel
> >> strongly or if it was an error please put it back
> >> ----------------
> >>
> >>
> >>  -#endif /*
> >> +# endif /*
> >> _______________________________________________
> >> Openmp-dev mailing list
> >> Openmp-dev at lists.llvm.org
> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20160617/8c305018/attachment.bin>


More information about the Openmp-dev mailing list