[Bioc-devel] Newbie Question - How to submit patches

Paul Gordon gordonp at ucalgary.ca
Thu Oct 13 22:13:21 CEST 2005

Hi Byron,

I guess I am used to ANSI C, and didn't realize Bioconductor requires a 
C99 compliant compiler.  As it is only a two files that break the ANSI 
standard, and they have a quick fix, would you consider dropping that 
requirement? Do you have a quick tip on how to change the compilation 
settings within R (Sun's cc does indeed need a special flag to compile 
in C99 mode)...

BTW, I used malloc() because I declared the double arrays as double 
pointers at the start of the function, and the array size isn't known 
until later in the function, e.g. from genefilter's rowPAUCs.c:

    lx = d;
    double xin[lx], yin[lx];


   double *xin, *yin;
    lx = d;
    if((xin = (double *) malloc(sizeof(double)*lx)) == NULL){
        perror("While creating input 'x' array in pAUC (genefilter 
    if((yin = (double *) malloc(sizeof(double)*lx)) == NULL){
        perror("While creating input 'y' array in pAUC (genefilter 

Kind regards,


> Local variable declarations are part of the ISO C99 spec (and,  
> generally speaking, a good idea IMHO). It may be that you just need  
> to toss in a compiler switch. Also, why do you need to malloc them?
> On Oct 13, 2005, at 12:11 PM, Paul Gordon wrote:
>> Hi all,
>> I just subscribed to this list today, so sorry if my question is  naive.
>> I have dowloaded and compiled R with Sun's Workshop Pro compiler to
>> optimize my performance (I find it's about 30-40% faster than gcc with
>> optimization flags), and hence it tries to compile new packages  
>> (such as
>> those in Bioconductor) with the Sun's cc too.  I have found that some
>> packages (including established ones like genefilter and gcrma) have C
>> files that compile under gcc, but don't strictly adhere to the C spec,
>> and hence don't compile for me.  More specifically, gcc lets you  
>> declare
>> variable in the middle of a function, but the C spec doesn't (in C+ + 
>> you
>> can, but these source files are not flagged as C++).  I've created
>> patches for the few source files affected (using malloc() to  
>> dynamically
>> create these arrays), but how should I submit these?  Am I the first
>> person not using gcc under Unix?
>> Thanks in advance for your input,
>> Paul Gordon
>> _______________________________________________
>> Bioc-devel at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> ---
> Byron Ellis (ellis at stat.harvard.edu)
> "Oook" -- The Librarian

More information about the Bioc-devel mailing list