Skip to content

Commit

Permalink
Document the name of the CHERI prototypes warning flag
Browse files Browse the repository at this point in the history
  • Loading branch information
arichardson committed May 27, 2020
1 parent a4d5d75 commit 668878f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cheri-c-programming.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1294,12 +1294,11 @@ \subsection{Function prototypes and calling conventions}
POSIX systems)\footnote{The forthcoming ISO C2x standard
makes function declarations with an empty parameter list equivalent to
a parameter list consisting of a single \ccode{void}.}.
The compiler will warn when a function without a declared prototype is
called.\footnote{If the \textit{K\&R} function is defined within the same
To avoid these problems, the CHERI Clang compiler emits a warning (\commandline{-Wcheri-prototypes}) by default when a function without a declared prototype is called.
This warning is less strict than \commandline{-Wstrict-prototypes} and can be
used to convert \textit{K\&R} functions that may cause problems.\footnote{If the \textit{K\&R} function is defined within the same
file, the compiler can determine the correct calling convention and will not
emit a warning.}
This warning is less strict than \commandline{-Wstrict-prototypes} and can be
used to convert \textit{K\&R} functions that may cause problems.
This should not be an issue for C code written in the last 20 years, but
many core operating-system components can be significantly older.

Expand Down

0 comments on commit 668878f

Please sign in to comment.