<?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: Ansi C compiler Linux vs. HPUX in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218786#M62234</link>
    <description>Hello Steven:&lt;BR /&gt;&lt;BR /&gt;Thanks for the response. &lt;BR /&gt;&lt;BR /&gt;I have denoted line 227 with //Problem in the snipet.  Sorry about that.&lt;BR /&gt;&lt;BR /&gt;I pretty sure for HPUX we are using cc and for Linux we are using gcc.&lt;BR /&gt;&lt;BR /&gt;Yes, I mean it compiles in HPUX without any WARNINGS.  But in Linux it give the the aforementioned WARNING.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 18 Jun 2008 21:04:40 GMT</pubDate>
    <dc:creator>Scott McDade</dc:creator>
    <dc:date>2008-06-18T21:04:40Z</dc:date>
    <item>
      <title>Ansi C compiler Linux vs. HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218784#M62232</link>
      <description>Hello all:&lt;BR /&gt;&lt;BR /&gt;I am trying to port some old Ansi C source code to Linux that was originally written and compiled on a HPUX machine.   I would like to try and resolve this warning in the following code.  It compiles without issue in HPUX.&lt;BR /&gt;&lt;BR /&gt;ACME.c:227: warning: assignment makes integer from pointer without a cast&lt;BR /&gt;&lt;BR /&gt;Problematic  Code:&lt;BR /&gt;&lt;BR /&gt;/* Strip off the directory path to the testspec, RKEEP */&lt;BR /&gt;    strcpy(buf,Get_tag(&amp;amp;systemtag,"SYS_COMMENT",4));&lt;BR /&gt;    while (strstr(buf,"/") != NULL) {&lt;BR /&gt; strcpy(buf,strstr(buf,"/")+1); }&lt;BR /&gt;    printf("WOW =%s\n",buf);&lt;BR /&gt;    Tmmp1=strstr(buf,"qk"); // Problem&lt;BR /&gt;    Tmmp2=strstr(buf,"as"); // Problem&lt;BR /&gt;    printf("Tmmp1: %d\n",Tmmp1);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Jun 2008 17:30:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218784#M62232</guid>
      <dc:creator>Scott McDade</dc:creator>
      <dc:date>2008-06-18T17:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Ansi C compiler Linux vs. HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218785#M62233</link>
      <description>It would be easier to puzzle this out if&lt;BR /&gt;someone besides you knew which line was 227.&lt;BR /&gt;Still easier, if you supplied a whole failing&lt;BR /&gt;test program, instead of a fragment which&lt;BR /&gt;can't be compiled.  (I can be at least as&lt;BR /&gt;lazy in debugging your problem as you can be&lt;BR /&gt;in presenting it.)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; It compiles without issue in HPUX.&lt;BR /&gt;&lt;BR /&gt;Using which compiler?  And what are you using&lt;BR /&gt;on your (unspecified) Linux system?&lt;BR /&gt;&lt;BR /&gt;(I assume that you mean "without problems" or&lt;BR /&gt;"without complaints", rather than "without&lt;BR /&gt;issue".  A compiler without issue is pretty&lt;BR /&gt;much a no-op.)</description>
      <pubDate>Wed, 18 Jun 2008 20:43:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218785#M62233</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-18T20:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Ansi C compiler Linux vs. HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218786#M62234</link>
      <description>Hello Steven:&lt;BR /&gt;&lt;BR /&gt;Thanks for the response. &lt;BR /&gt;&lt;BR /&gt;I have denoted line 227 with //Problem in the snipet.  Sorry about that.&lt;BR /&gt;&lt;BR /&gt;I pretty sure for HPUX we are using cc and for Linux we are using gcc.&lt;BR /&gt;&lt;BR /&gt;Yes, I mean it compiles in HPUX without any WARNINGS.  But in Linux it give the the aforementioned WARNING.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Jun 2008 21:04:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218786#M62234</guid>
      <dc:creator>Scott McDade</dc:creator>
      <dc:date>2008-06-18T21:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Ansi C compiler Linux vs. HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218787#M62235</link>
      <description>&amp;gt; [...] for HPUX we are using cc [...]&lt;BR /&gt;&lt;BR /&gt;Version(s)?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] for Linux we are using gcc [...]&lt;BR /&gt;&lt;BR /&gt;Version?&lt;BR /&gt;&lt;BR /&gt;But none of the usually useful info may make&lt;BR /&gt;any difference, because there's not enough&lt;BR /&gt;code here to identify a problem.&lt;BR /&gt;&lt;BR /&gt;Can't see the "#include" directives.&lt;BR /&gt;Can't see the declarations of anything.&lt;BR /&gt;Can't see the compiler command(s).&lt;BR /&gt;&lt;BR /&gt;Either I'm missing some obvious things, or&lt;BR /&gt;you failed to include them in your problem&lt;BR /&gt;description.&lt;BR /&gt;&lt;BR /&gt;I might be able to write a program which&lt;BR /&gt;includes your program fragment, and which&lt;BR /&gt;either triggers similar complaints or not,&lt;BR /&gt;but my program would not be your program, and&lt;BR /&gt;there's no reason to imagine that solving any&lt;BR /&gt;problems with my program would help yours.&lt;BR /&gt;&lt;BR /&gt;I'm still just as lazy as I was before.  You,&lt;BR /&gt;too, apparently.  If you would like actual&lt;BR /&gt;help with a program, try providing an actual&lt;BR /&gt;program.  (Or try a psychic hotline.  My&lt;BR /&gt;remote viewing ability is practically&lt;BR /&gt;nonexistent.)</description>
      <pubDate>Thu, 19 Jun 2008 00:35:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218787#M62235</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-19T00:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ansi C compiler Linux vs. HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218788#M62236</link>
      <description>Hello &lt;BR /&gt;&lt;BR /&gt;gcc rev is 3.4.5-2,  the HPUX cc compiler version is unknown at this point as the box is offline.&lt;BR /&gt;&lt;BR /&gt;I have a attached source file.  Check out line 226 and 227 I believe the problem has to do with type cast of Tmmp1 and Tmmp2 and buf.  I have tried many combinations without success.</description>
      <pubDate>Thu, 19 Jun 2008 01:21:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218788#M62236</guid>
      <dc:creator>Scott McDade</dc:creator>
      <dc:date>2008-06-19T01:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ansi C compiler Linux vs. HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218789#M62237</link>
      <description>&lt;!--!*#--&gt;&amp;gt; I have a attached source file.  [...]&lt;BR /&gt;&lt;BR /&gt;But not "tbldata.h", making it a bit tough to&lt;BR /&gt;compile.&lt;BR /&gt;&lt;BR /&gt;C comments delimited by "#"?  Not very&lt;BR /&gt;portable:&lt;BR /&gt;&lt;BR /&gt;alp $ cc /list 306754.c&lt;BR /&gt;&lt;BR /&gt;#*****************************************************************************&lt;BR /&gt;.^&lt;BR /&gt;%CC-W-BADDIRECTIVE, "*" is an invalid preprocessor directive, and is being ignor&lt;BR /&gt;ed.&lt;BR /&gt;at line number 1 in file ALP$DKA0:[SMS.ITRC]306754.C;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Line 148:&lt;BR /&gt;&lt;BR /&gt;    int wff, badd, DoNot, , Tmmp2, cob, boo, ick, idoit, tstnam;&lt;BR /&gt;&lt;BR /&gt;So Tmmp2 is explicitly an "int".  There's no&lt;BR /&gt;sign of a declaration of Tmmp1 (although&lt;BR /&gt;there is a suspicious hole), so it's&lt;BR /&gt;implicitly an "int".&lt;BR /&gt;&lt;BR /&gt;dy # grep 'strstr(' /usr/include/*.h&lt;BR /&gt;/usr/include/string.h:     extern char *strstr(const char *, const char *);&lt;BR /&gt;/usr/include/string.h:     extern char *strstr();&lt;BR /&gt;&lt;BR /&gt;(Or "man strstr".)&lt;BR /&gt;&lt;BR /&gt;So strstr() is char *.&lt;BR /&gt;&lt;BR /&gt;Thus&lt;BR /&gt;    Tmmp1=strstr([...])&lt;BR /&gt;    Tmmp2=strstr([...])&lt;BR /&gt;store a pointer into an "int", hence the&lt;BR /&gt;complaints.  If you're storing pointers, put&lt;BR /&gt;them into pointers:&lt;BR /&gt;&lt;BR /&gt;char *Tmmp1;&lt;BR /&gt;char *Tmmp2;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jun 2008 03:16:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218789#M62237</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-19T03:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Ansi C compiler Linux vs. HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218790#M62238</link>
      <description>&lt;!--!*#--&gt;For another opinion:&lt;BR /&gt;&lt;BR /&gt;alp $ cc /version&lt;BR /&gt;HP C V7.3-009 on OpenVMS Alpha V7.3-2&lt;BR /&gt;&lt;BR /&gt;alp $ type 306754_x2.C&lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;    char buf[1024];&lt;BR /&gt;    int Tmmp2;&lt;BR /&gt;&lt;BR /&gt;    Tmmp1=strstr(buf,"qk");&lt;BR /&gt;    Tmmp2=strstr(buf,"as");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;alp $ cc 306754_x2.C&lt;BR /&gt;&lt;BR /&gt;    Tmmp1=strstr(buf,"qk");&lt;BR /&gt;....^&lt;BR /&gt;%CC-E-UNDECLARED, In this statement, "Tmmp1" is not declared.&lt;BR /&gt;at line number 8 in file ALP$DKA0:[SMS.ITRC]306754_X2.C;1&lt;BR /&gt;&lt;BR /&gt;    Tmmp2=strstr(buf,"as");&lt;BR /&gt;....^&lt;BR /&gt;%CC-W-CVTDIFTYPES, In this statement, "strstr(...)" of type "pointer to char", is being converted to "int".&lt;BR /&gt;at line number 9 in file ALP$DKA0:[SMS.ITRC]306754_X2.C;1&lt;/STRING.H&gt;</description>
      <pubDate>Thu, 19 Jun 2008 03:47:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218790#M62238</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-19T03:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ansi C compiler Linux vs. HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218791#M62239</link>
      <description>&lt;!--!*#--&gt;By the way:&lt;BR /&gt;&lt;BR /&gt;alp $ type 306754_ok.c&lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;    char buf[1024];&lt;BR /&gt;    char *Tmmp1;&lt;BR /&gt;    char *Tmmp2;&lt;BR /&gt;&lt;BR /&gt;    Tmmp1=strstr(buf,"qk");&lt;BR /&gt;    Tmmp2=strstr(buf,"as");&lt;BR /&gt;}&lt;BR /&gt;alp $ cc 306754_ok.c&lt;BR /&gt;alp $&lt;/STRING.H&gt;</description>
      <pubDate>Thu, 19 Jun 2008 12:30:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ansi-c-compiler-linux-vs-hpux/m-p/4218791#M62239</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-19T12:30:45Z</dc:date>
    </item>
  </channel>
</rss>

