<p>When I try to precompile a *.pc file that contains a #warning directive I recieve the following error:</p>

<blockquote>
  <p>PCC-S-02014, Encountered the symbol "warning" when expecting one of the following: (bla bla bla).</p>
</blockquote>

<p>Can I somehow convince Pro*C to ignore the thing if it doesn't know what to do with it? I can't remove the <code>#warning</code> directive as it's used in a header file that I can't change and must include.</p>

[{'answer_id': 14999, 'author': 'Jon Bright', 'author_id': 1813, 'author_profile': 'https://Stackoverflow.com/users/1813', 'pm_score': 0, 'selected': False, 'text': "<p>You can't.  Pro*C only knows #if and #include.  My best advice would be to preprocess the file as part of your build process to remove stuff Pro*C won't like.  Something like</p>\n\n<pre><code>grep -v -E '^#(warning|pragma|define)' unchangeable.h &gt;unchangeable.pc.h\n</code></pre>\n\n<p>My other advice would be to avoid the abomination which is Pro*C, but I'm guessing you're stuck with it...</p>\n"}, {'answer_id': 23585, 'author': 'Jon Ericson', 'author_id': 1438, 'author_profile': 'https://Stackoverflow.com/users/1438', 'pm_score': 4, 'selected': True, 'text': '<p>According to the <em>Pro*C/C++ Programmer\'s Guide</em> (chapter 5 "Advanced Topics"), Pro*C silently ignores a number of preprocessor directives including #error and #pragma, but sadly not #warning.  Since your warning directives are included in a header file, you might be able to use the ORA_PROC macro:</p>\n\n<pre><code>#ifndef  ORA_PROC\n#include &lt;irrelevant.h&gt;\n#endif\n</code></pre>\n\n<p>For some reason, Pro*C errors out if you try to hide a straight #warning that way, however.  </p>\n'}, {'answer_id': 76234, 'author': 'EvilTeach', 'author_id': 7734, 'author_profile': 'https://Stackoverflow.com/users/7734', 'pm_score': 0, 'selected': False, 'text': "<p>Jons Ericsons answer is correct.</p>\n\n<p>There is a second circumstance where you may need to use that trick.</p>\n\n<p>Some versions of Pro*c can't deal with include files that don't have a file extension.</p>\n\n<p>The ORA_PROC constant is one workable solution to that problem as well.</p>\n"}, {'answer_id': 336382, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>/bin/make -f /css/hwmig/pcprg/proc9i32.mk PROCFLAGS="sqlcheck=SEMANTICS userid=cssd/india09" PCCSRC=bic I_SYM=include= pc1\n    proc sqlcheck=SEMANTICS userid=cssd/india09 iname=bic include=. include=/oracle/Ora92/precomp/public include=/oracle/Ora92/rdbms/public include=/oracle/Ora92/rdbms/demo include=/oracle/Ora92/plsql/public include=/oracle/Ora92/network/public</p>\n\n<p>Pro*C/C++: Release 9.2.0.6.0 - Production on Tue Dec 2 14:05:38 2008</p>\n\n<p>Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.</p>\n\n<p>System default option values taken from: /oracle/Ora92/precomp/admin/pcscfg.cfg</p>\n\n<p>Syntax error at line 135, column 2, file /usr/include/standards.h:\nError at line 135, column 2 in file /usr/include/standards.h</p>\n\n<h1>warning  The -qdfp option is required to process DFP code in headers.</h1>\n\n<p>.1\nPCC-S-02014, Encountered the symbol "warning" when expecting one of the followin\ng:</p>\n\n<p>a numeric constant, newline, define, elif, else, endif,\n   error, if, ifdef, ifndef, include, line, pragma, undef,\n   an immediate preprocessor command, a C token,\nThe symbol "newline," was substituted for "warning" to continue.</p>\n\n<p>Syntax error at line 30, column 7, file bic.pc:\nError at line 30, column 7 in file bic.pc\nFILE  <em>fp;\n......1\nPCC-S-02201, Encountered the symbol "</em>" when expecting one of the following:</p>\n\n<p>; , = ( [\nThe symbol ";" was substituted for "*" to continue.</p>\n\n<p>Error at line 0, column 0 in file bic.pc\nPCC-F-02102, Fatal error while doing C preprocessing</p>\n'}, {'answer_id': 1051407, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': -1, 'selected': False, 'text': '<p>Remove below two lines from /usr/include/standards.h</p>\n<h1>warning  The -qdfp option is required to process DFP code in headers.</h1>\n<h1>else</h1>\n'}, {'answer_id': 3911475, 'author': 'Ludwig', 'author_id': 472884, 'author_profile': 'https://Stackoverflow.com/users/472884', 'pm_score': 2, 'selected': False, 'text': '<p>use option <code>parse=none</code> with proc</p>\n'}, {'answer_id': 4734773, 'author': 'yijy', 'author_id': 581350, 'author_profile': 'https://Stackoverflow.com/users/581350', 'pm_score': -1, 'selected': False, 'text': '<p>Modify <code>/usr/include/standards.h</code>.<br>\nDelete the line <code>#warning  The -qdfp option is required to process DFP code in headers.</code>      The proc does not support the <code>#warning</code>，just <code>#else</code> <code>#if</code> etc.</p>\n'}]
['https://Stackoverflow.com/questions/14698', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1733/']