AdityaSarang / pdsh

Automatically exported from code.google.com/p/pdsh
GNU General Public License v2.0
0 stars 0 forks source link

Compile of genders.c fails #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
 cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -D_REENTRANT -mt -O2 -Wl,-E -I/usr/local/include -I/usr/include -c genders.c
  -DPIC -o .libs/genders_la-genders.o
"genders.c", line 527: error #2029: expected an expression
                   query ?: "(all)", genders_errormsg(gh));
                          ^

"genders.c", line 527: error #2053: expected a ":"
                   query ?: "(all)", genders_errormsg(gh));
                                                         ^

"genders.c", line 536: error #2029: expected an expression
                   query ?: "(all)", genders_errormsg(gh));
                          ^

"genders.c", line 536: error #2053: expected a ":"
                   query ?: "(all)", genders_errormsg(gh));
                                                         ^

4 errors detected in the compilation of "genders.c".

The compiler used is the HP C/aC++ B3910B A.06.25.02 [Nov 25 2010]

Original issue reported on code.google.com by bwir...@gmail.com on 20 Apr 2011 at 2:05

GoogleCodeExporter commented 8 years ago
Hm, maybe the "?:" construct is a gcc-ism or something. Can you try the 
attached patch?

Original comment by mark.gro...@gmail.com on 20 Apr 2011 at 2:44

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by mark.gro...@gmail.com on 20 Apr 2011 at 2:44

GoogleCodeExporter commented 8 years ago
Ok, I verified that the omission of the middle operand in the conditional 
expression
is a gcc-ism. I'll remove the use of it from pdsh code. Thanks for catching 
this.
Once you verify that the patch fixes the issue, I'll commit the fix.

http://gcc.gnu.org/onlinedocs/gcc/Conditionals.html

Original comment by mark.gro...@gmail.com on 20 Apr 2011 at 4:20

GoogleCodeExporter commented 8 years ago
I confirmed that this patch allows genders.c to successfully compile.  Thanks 
for your fast response!

Original comment by bwir...@gmail.com on 20 Apr 2011 at 6:58

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1320.

Original comment by mark.gro...@gmail.com on 22 Apr 2011 at 2:32