<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HP ANSI C Compiler and prototype checking in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582786#M924601</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Easy, add the +M flag to the command line.&lt;BR /&gt;&lt;BR /&gt;Clay</description>
    <pubDate>Fri, 21 Sep 2001 13:05:36 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2001-09-21T13:05:36Z</dc:date>
    <item>
      <title>HP ANSI C Compiler and prototype checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582783#M924598</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I have a problem about the HP ANSI C compiler.&lt;BR /&gt;The product I installed is &lt;BR /&gt;B3901BA HP C/ANSI C Developer's Bundle for HP-UX 11.00(S800)&lt;BR /&gt;To avoid typo and other prototype inconsistence errors, I'd like to have the HP Ansi C compiler behaves like hp aCC compiler to enforce strict prototype checking.&lt;BR /&gt;I mean I'd like the following simple test program won't be compiled under HP ansi cc.&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char **argv) {&lt;BR /&gt;printf("%d\n", sum(1,2));&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;int sum(int a, int b) {&lt;BR /&gt; return(a+b);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Since the function sum has no prototype. When compiles the same program using aCC, aCC reports the following:&lt;BR /&gt;Function 'sum' has not been defined yet; cannot call.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is there any command line switch or directives for HP ANSI C compiler to do this?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;-Xiang ZHAO&lt;/STDIO.H&gt;</description>
      <pubDate>Fri, 21 Sep 2001 07:34:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582783#M924598</guid>
      <dc:creator>Xiang Zhao</dc:creator>
      <dc:date>2001-09-21T07:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: HP ANSI C Compiler and prototype checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582784#M924599</link>
      <description>Why not use the aCC compiler to compile your code instead of using the Ansi/C compiler?  It should be able to compile straight C code.&lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
      <pubDate>Fri, 21 Sep 2001 07:55:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582784#M924599</guid>
      <dc:creator>Santosh Nair_1</dc:creator>
      <dc:date>2001-09-21T07:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: HP ANSI C Compiler and prototype checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582785#M924600</link>
      <description>Try one the two options on the cc command line&lt;BR /&gt;&lt;BR /&gt;1) -Aa&lt;BR /&gt;&lt;BR /&gt;2) -Ae&lt;BR /&gt;&lt;BR /&gt;Hope this works</description>
      <pubDate>Fri, 21 Sep 2001 12:43:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582785#M924600</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-09-21T12:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: HP ANSI C Compiler and prototype checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582786#M924601</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Easy, add the +M flag to the command line.&lt;BR /&gt;&lt;BR /&gt;Clay</description>
      <pubDate>Fri, 21 Sep 2001 13:05:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582786#M924601</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-09-21T13:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: HP ANSI C Compiler and prototype checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582787#M924602</link>
      <description>Hi Xiang,&lt;BR /&gt;&lt;BR /&gt;Have a look at the thread below. It may help.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/hpux/onlinedocs/dev/aCC/a_05_30/otherlangs.htm" target="_blank"&gt;http://docs.hp.com/hpux/onlinedocs/dev/aCC/a_05_30/otherlangs.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Sep 2001 13:12:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582787#M924602</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2001-09-21T13:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: HP ANSI C Compiler and prototype checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582788#M924603</link>
      <description>&lt;BR /&gt;Hi again,&lt;BR /&gt;&lt;BR /&gt;I might as well give you the full syntax:&lt;BR /&gt;&lt;BR /&gt;cc -Aa (or -Ae) +M +We 714 myfile.c&lt;BR /&gt;&lt;BR /&gt;The +M enables ANSI migration warnings&lt;BR /&gt;The +We 714 promotes missing prototype warnings to an error. You can add other warning promotions +We 714,715,720 ...&lt;BR /&gt;&lt;BR /&gt;That should do it though I would probably wrap all that in an include for your makefiles. You will probably have to intentionally make a few errors to get all the warnings promoted.&lt;BR /&gt;Most of the warnings are listed in&lt;BR /&gt; /opt/ansic/lib/nls/msg/C/cc.msgs.&lt;BR /&gt;&lt;BR /&gt;Clay&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Sep 2001 13:28:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ansi-c-compiler-and-prototype-checking/m-p/2582788#M924603</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-09-21T13:28:19Z</dc:date>
    </item>
  </channel>
</rss>

