boostorg / mpl

Boost.org mpl module
http://boost.org/libs/mpl
Boost Software License 1.0
52 stars 78 forks source link

changed angled brackets with quotes for gcc include file in preproces… #32

Closed mihaipop11 closed 6 years ago

mihaipop11 commented 6 years ago

Fix to ticket #13449

mclow commented 6 years ago

I have no opinion on this specific change, but in general, headers in the boost/ hierarchy are included via angle-brackets. However, I've read the trac issue, so I see where you're coming from.

mihaipop11 commented 6 years ago

i can understand that a general guideline is nice to have for the sources, another fix for this would be to disable the GNU Extensions by compiling with -std=c++{98,11,14,17,2a} but this is not a generic solution

mihaipop11 commented 6 years ago

i can see how you think that probably is not worth it just because someone tries to run the script in a folder named linux, normally i wouldn't care about this minor thing, but lets take this example: in a yocto project context it is a high change to have in the path a folder named linux and it's not that nice to fix it

eldiener commented 6 years ago

Are you saying that the mnemonic 'linux' is a macro under gcc ?

mclow commented 6 years ago

Are you saying that the mnemonic 'linux' is a macro under gcc ?

Yes, that's what he's saying. Along with a whole bunch of other names. :-( Use gcc -dM -E - < /dev/null to show them all. Fortunately most (but not all) of them start with a double underscore.

mihaipop11 commented 6 years ago

indeed, before ANSI i believe, there was no standard regarding these macros so the developers just used linux, unix... , then when the ANSI standard was created, the developers reached the conclusion that the macros should start with double underscore and end with double underscore ex: __linux__

eldiener commented 6 years ago

As long as this does not affect anything negatively I can merge this. Is there any case in which the switch from <> to "" might cause any problems in the gcc invocation with current versions of gcc ?

mihaipop11 commented 6 years ago

not that i know of. i tried with gcc5-6-7, in all cases there were no problems after the patch was applied.