Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
C (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Language tools == {{More citations needed section|date=July 2014}} A number of tools have been developed to help C programmers find and fix statements with undefined behavior or possibly erroneous expressions, with greater rigor than that provided by the compiler. Automated source code checking and auditing tools exist, such as [[lint (software)|Lint]]. A common practice is to use Lint to detect questionable code when a program is first written. Once a program passes Lint, it is then compiled using the C compiler. Also, many compilers can optionally warn about syntactically valid constructs that are likely to actually be errors. [[MISRA C]] is a proprietary set of guidelines to avoid such questionable code, developed for embedded systems.<ref name="MI2L0">{{cite web|url=http://www.unix.com/man-page/FreeBSD/1/lint |title=Man Page for lint (freebsd Section 1) |website=unix.com |date=May 24, 2001 |access-date=July 15, 2014}}</ref> There are also compilers, libraries, and operating system level mechanisms for performing actions that are not a standard part of C, such as [[bounds checking]] for arrays, detection of [[buffer overflow]], [[serialization]], [[dynamic memory]] tracking, and [[automatic garbage collection]]. Memory management checking tools like [[IBM Rational Purify|Purify]] or [[Valgrind]] and linking with libraries containing special versions of the [[malloc|memory allocation functions]] can help uncover runtime errors in memory usage.<ref>{{Cite web |title=CS107 Valgrind Memcheck |url=https://web.stanford.edu/class/archive/cs/cs107/cs107.1236/resources/valgrind.html |access-date=June 23, 2023 |website=web.stanford.edu}}</ref><ref>{{Cite journal |last1=Hastings |first1=Reed |last2=Joyce |first2=Bob |title=Purify: Fast Detection of Memory Leaks and Access Errors |url=https://web.stanford.edu/class/cs343/resources/purify.pdf |journal=Pure Software Inc. |pages=9}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)