Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 84622ea

Browse files
committed
more on (modern) compilers
1 parent 7883e56 commit 84622ea

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

‎intro.tex‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,11 +880,26 @@
880880

881881
\begin{itemize}
882882
\item \texttt{-l}/\texttt{-L} are actually options for the linker, i.e. the
883-
compiler will pass them on onto the linker.
883+
compiler will pass them on onto the linker. To pass options to the linker
884+
in more robust way, use the \texttt{-Xlinker} option.
884885
\item Both the compiler and linker have an extensive list of additional options
885886
that influence the generated code and what warnings are printed during the
886887
compilation/linking based on the chosen language and the standard. See manual
887-
pages for \texttt{cc}, \texttt{gcc}, and/or \texttt{ld}.
888+
pages for \texttt{cc}, \texttt{gcc} or \texttt{clang}, and/or \texttt{ld}.
889+
\item There are many additional warnings and sets of warnings which can be
890+
enabled for compilation such as \texttt{-Wall}, \texttt{-Wextra},
891+
\texttt{-pedantic} and many others.
892+
\item Also, it might be worthwhile to convert all warnings into errors via
893+
\texttt{-Werror} to make sure the problems do not go unaddressed.
894+
\item These days modern compilers include extra checks which used to be part
895+
of program called \texttt{lint} which checked for unused variables, mismatches
896+
in format strings etc. They also provide almost graphical level of warnings
897+
showing not only what is problematic but also how it can be fixed.
898+
\item Also, modern compilers feature the capability of formerly standalone
899+
\emph{static analyzers} e.g. being able to detect problems across function calls.
900+
\item Further, modern compilers have error checking plugins which change the
901+
emitted code to employ various checks, e.g. \emph{address sanitizer} (detecting
902+
out of bounds access, heap allocation problems, etc.) or \emph{thread sanitizer}.
888903
\end{itemize}
889904

890905
%%%%%

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /