[riot-notifications] [RIOT-OS/RIOT] Question: Where does the `#include` conding convention come from? (#15522)

Karl Fessel notifications at github.com
Mon Nov 30 12:08:04 CET 2020

Where does the `#include` coding convention come from?

### Description
RIOT-OS has a coding convention of using `#include " "` for its RIOT System includes to differentiate them from `#include < >` which should be used for compiler includes only.

This seems special to me and at least to some other people [PR in ndn-riot](https://github.com/named-data-iot/ndn-riot/pull/14#issuecomment-733788536.) I tried to find the reasoning in the RIOT git history but i failed. In  7caf7881a2eb (14/11/2013) Ludwig Ortmann mentioned the coding convetion (maybe the first time). The Coding_Convetions .md file got added by @maribu  at 25/10/2019 but somehow must have been there before.

As i wrote in the ndn PR at least Arduino and Zephy use `< >` for non compiler library includes.

### Useful links
[a blog post that did some digging through c standard](http://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art026)
[not very help full gcc manual](http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html)
[microsoft was a little more clear](https://docs.microsoft.com/en-us/cpp/preprocessor/hash-include-directive-c-cpp?view=msvc-160) there are some words about parent includes that if they apply to gcc my lead to some difficult to explain behavior.

###my 2 cent 
Reading the blog-post mentioned above i get the C-Standard does not say anything to distinguish `#include ""` from `#include <>` (i also checked if newer or newer standards say something but the paragraph seems to be unchanged); K&R said something which the RIOT CC conflicts with. 

quoting myself from the ndn PR:
> K&R could have saved us from this discussion if they just had not defined the fallback case for ` " "`
> it would have been you know the path -> `" "`
> compiler has to search -> `< >`

the fallback case for `" "` is what RIOT is using 

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201130/ab061441/attachment.htm>

More information about the notifications mailing list