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 preprocessor
(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!
=== Warning === As of [[C23 (C standard revision)|C23]]<ref name="N3096">{{cite web |title=WG14-N3096 : Draft for ISO/IEC 9899:2023 |url=https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf |website=open-std.org |archive-url=https://web.archive.org/web/20230402172459/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf |archive-date=2 April 2023 |date=1 April 2023 |url-status=live}}</ref> and [[C++23]],<ref>{{Cite web|title=Working Draft, Standard for Programming Language C++|url=https://open-std.org/JTC1/SC22/WG21/docs/papers/2023/n4944.pdf|date=2023-03-22}}</ref> a warning directive, <code>#warning</code>, to print a message without aborting is provided. Some typical uses are to warn about the use of [[deprecated]] functionality. For example: Prior to C23 and C++23, this directive existed in many compilers as a non-standard feature, such as the C compilers by GNU, Intel, Microsoft and IBM. Because it was non-standard, the warning macro had varying forms: <syntaxhighlight lang="c"> // GNU, Intel and IBM #warning "Do not use ABC, which is deprecated. Use XYZ instead." // Microsoft #pragma message("Do not use ABC, which is deprecated. Use XYZ instead.") </syntaxhighlight>
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)