<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi All:<div><br></div><div>The problem is that NULL is heavily used/defined, but not part of the C language. The usual interpretation is that NULL means "null pointer" (char*)0 [the PGI interpretation], but another view is that NULL is the null char.</div><div><br></div><div>The simplest approach is to override all of this and just use #define NULL 0</div><div><br></div><div>Then the automatic conversions all work. PGI should not really try to force its view of what NULL means (albeit the common view) on users, as NULL is not part of the standard (while encouraging users not to use idioms like comparing chars to NULL.</div><div><br></div><div>I'll chat with the Portland folks about this next week ...</div><div><br><div><div>On 09/11/2010, at 3:30 AM, Bianco, Todd wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello, <br>My apologies, but I am not sure to whom this email is being sent. This is Todd Bianco, I am a postdoc at Brown working with Marc Parmentier. I have an unsupported version of CitcomCU that I have been using for years, and compiling with GNU. The department at Brown would like me to use PGI compilers, but I have never successfully compiled Citcom with the PGI compilers. I have searched the mail archives and help topics, but did not find a discussion about PGI compiler issues.<br> <br>The problem is with comparisons to NULL. For example, in the current version of CitcomCU, line 446 in Parsing.c will cause the following error:<br><br>PGC-S-0103-Illegal operand types for comparison operator<br><br>This is because of how NULL is defined. A similar problem for a different code, a and potential solution, are discussed here:<br> <a href="http://www.pgroup.com/userforum/viewtopic.php?p=46&sid=86257394adf1934ff26676ddc7a1ad2a">http://www.pgroup.com/userforum/viewtopic.php?p=46&sid=86257394adf1934ff26676ddc7a1ad2a</a> I do not fully understand the discussion. <br> <br>The error listed above is simply a warning or ignored when I use GNU compilers. Can the current version of CitcomCU can be compiled with PGI compilers? Did CIG address this problem to get CitcomCU to compile, or am I the only user reporting this problem? Do I need to set a different definition of NULL in stddef.h? Can I override the definition of NULL more locally, for example in global_defs.h, as I do not have permission to edit stddef.h on my cluster? Any help is appreciated.<br> <br>Regards, <br>Todd<br> _______________________________________________<br>CIG-MC mailing list<br><a href="mailto:CIG-MC@geodynamics.org">CIG-MC@geodynamics.org</a><br>http://geodynamics.org/cgi-bin/mailman/listinfo/cig-mc<br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div><div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>Cheers -- Bill</div><div><br></div><div>------------------------------------------------------------</div><div>Bill Appelbe +61 39925 4648</div><div>CEO, VPAC mobile)+61 0418 557115</div><div> (fax) +61 3 9925 4647</div><div>www.vpac.org <a href="mailto:bill@vpac.org">bill@vpac.org</a></div><div><br></div><div>Jane Douglas +61 3 9925 4734</div><div>Executive Assistant <span class="Apple-converted-space"> </span><a href="mailto:jdouglas@vpac.org">jdouglas@vpac.org</a> </div><div><br></div><div><br></div></div></div></div></div><br></div></div></div></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>