MichaelChirico / r-bugs

A ⚠️read-only⚠️mirror of https://bugs.r-project.org/
20 stars 0 forks source link

[BUGZILLA #421] problem with va_list type (alpha) #579

Closed MichaelChirico closed 4 years ago

MichaelChirico commented 4 years ago

From: albrecht.gebhardt@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>-klu.ac.at Full_Name: Albrecht Gebhardt Version: 0.99.0 OS: alpha, osf4.0 Submission from: (NULL) (143.205.180.40)

Both DEC cc and gcc complain (osf4.0, alpha) about applying an unary operator (!) to a non scalar type (va_list arg) in printutils.c

I'm not sure if I understood what was intended by "!arg" (see below), but with this patch I at least was able to compile. (and R runs now, but I guess only because I didn't came across this code section)

--- ./src/main/printutils.c.va_list.patch Mon Feb 7 15:08:14 2000 +++ ./src/main/printutils.c Mon Feb 7 15:52:54 2000 @@ -421,7 +421,7 @@ else { char buf[BUFSIZE], p = buf, vmax = vmaxget(); int slen, res;


METADATA

MichaelChirico commented 4 years ago

From: Peter Dalgaard BSA <p.dalgaard@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>> albrecht.gebhardt@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>-klu.ac.at writes:

I'm not sure if I understood what was intended by "!arg" (see below),
but with this patch I at least was able to compile. (and R runs now,
but I guess only because I didn't came across this code section)

--- ./src/main/printutils.c.va_list.patch     Mon Feb  7 15:08:14 2000
+++ ./src/main/printutils.c   Mon Feb  7 15:52:54 2000
@@ -421,7 +421,7 @@
else {
char buf[BUFSIZE], *p = buf, *vmax = vmaxget(); 
int slen, res;
-     if(!arg) {
+     if(&arg!=NULL) {
/* just a string, so length is known */
if((slen = strlen(format)) >= BUFSIZE)
p = R_alloc(slen+1, sizeof(char));

Not going to work, "if (0)" will (i.e. always take else branch).

And please check for similar reports before filing a new one, we discussed this at some length earlier today!

-- O_ ---- Peter Dalgaard Blegdamsvej 3
c/ /'
--- Dept. of Biostatistics 2200 Cph. N
<CENSORING FROM DETECTED PHONE NUMBER ONWARDS; SEE BUGZILLA>


METADATA

MichaelChirico commented 4 years ago

NOTES: Sam as PR#417, specific to Alpha, fixed for 0.99.0a


METADATA

MichaelChirico commented 4 years ago

Audit (from Jitterbug): Wed Feb 16 19:11:24 2000 ripley changed notes Wed Feb 16 19:11:24 2000 ripley moved from incoming to System-specific-fixed Wed Feb 16 19:32:10 2000 ripley moved from System-specific-fixed to Installation-fixed Wed Feb 16 19:32:58 2000 ripley changed notes


METADATA