build issues when using pcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello i compiled dash with pcc and found two issues:

src/output.h the outc macro is not standard c:
#define outc(c, file)<->((file)->nextc == (file)->end ? outcslow((c), (file)) : (*(file)->nextc = (c), (file)->nextc++))

type signature of the operands are int ? void : char*
but the two sides of : should be compatible
either use
    ... ? outcslow(), 0 : ...
or
    ... ? outcslow() : ..., (void)0
otherwise a standard compliant compiler won't compile it


the other issue is in the mkbuiltins:
it assumes that the cpp does not produce empty lines with
whitespace only
the following line
< $builtins sed '/^#/d; /^$/d' > $temp
should be
< $builtins sed '/^#/d; /^ *$/d' > $temp

so empty lines with spaces are dropped as well
(allowed by the standard after the preprocessing pass)


(also it would be nice to include a configure script in
the git repo, or don't use autoconf in the first place)
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux