-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Where does the #include " "
conding convention come from?
#15522
Comments
#include
conding convention come from?#include " "
conding convention come from?
Style. |
For reference, as the PR importing that .md indicates: the coding conventions where maintained in the Wiki before. Best way to track the history there is to check out the wiki via git ( |
i just checked gcc does not apply what msvc does for the quoted form rule 2 (the parrent include) < this would be a problem
gcc for quoted -> the currents file directory -> the rest is like angel brackets the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
Most other projects use |
Question was answered --> closing this. |
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 I tried to find the reasoning in the RIOT git history but i failed. In 7caf788 (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
not very help full gcc manual
microsoft was a little more clear there are some words about parent includes that if they apply to gcc my lead to some difficult to explain behavior.
K&R 2 page 102 and 103
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:
the fallback case for
" "
is what RIOT is usingThe text was updated successfully, but these errors were encountered: