diff options
author | fw <fw@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-04 15:33:11 +0000 |
---|---|---|
committer | fw <fw@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-04 15:33:11 +0000 |
commit | a1f1781ae8b54c384b7d193c2fd3ac8efc86932a (patch) | |
tree | 3992b4ad76993de282e9b81bbe8d85f5c7834619 /gcc/doc/cpp.texi | |
parent | 1ca9d4a972802d9b9820437130392a6dc59181a8 (diff) | |
download | gcc-a1f1781ae8b54c384b7d193c2fd3ac8efc86932a.tar.gz |
Implement #pragma GCC warning/error
2012-10-04 Florian Weimer <fweimer@redhat.com>
* doc/cpp.texi (Pragmas): Document #pragma GCC warning, #pragma
GCC error.
2012-10-04 Florian Weimer <fweimer@redhat.com>
* c-c++-common/cpp/diagnostic-pragma-1.c: New testcase.
2012-10-04 Florian Weimer <fweimer@redhat.com>
* directives.c (do_pragma_warning_or_error): New.
(do_pragma_warning): New.
(do_pragma_error): New.
(_cpp_init_internal_pragmas): Register new pragmas.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192084 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/cpp.texi')
-rw-r--r-- | gcc/doc/cpp.texi | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index b363db014bf..fa5989e6bde 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -3634,6 +3634,15 @@ This pragma takes no arguments. It causes the rest of the code in the current file to be treated as if it came from a system header. @xref{System Headers}. +@item #pragma GCC warning +@itemx #pragma GCC error +@code{#pragma GCC warning "message"} causes the preprocessor to issue +a warning diagnostic with the text @samp{message}. The message +contained in the pragma must be a single string literal. Similarly, +@code{#pragma GCC error "message"} issues an error message. Unlike +the @samp{#warning} and @samp{#error} directives, these pragmas can be +embedded in preprocessor macros using @samp{_Pragma}. + @end ftable @node Other Directives |