HenrikBengtsson / matrixStats

R package: Methods that Apply to Rows and Columns of Matrices (and to Vectors)
https://cran.r-project.org/package=matrixStats
202 stars 33 forks source link

BUILD WARNING: rowRanksWithTies_lowlevel_template.h:135:1: warning: embedding a directive within macro arguments is not portable #233

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 1 year ago
...
   gcc -I"/home/henrik/shared/software/CBI/R-4.3.0-gcc11/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c rowRanksWithTies.c -o rowRanksWithTies.o
   In file included from rowRanksWithTies_lowlevel.h:25,
                    from rowRanksWithTies.c:10:
   rowRanksWithTies_lowlevel_template.h: In function ‘rowRanksWithTies_Average_dbl’:
   rowRanksWithTies_lowlevel_template.h:135:1: warning: embedding a directive within macro arguments is not portable
     135 | #if MARGIN == 'r'
         | ^
   rowRanksWithTies_lowlevel_template.h:137:1: warning: embedding a directive within macro arguments is not portable
     137 | #elif MARGIN == 'c'
         | ^
   rowRanksWithTies_lowlevel_template.h:139:1: warning: embedding a directive within macro arguments is not portable
     139 | #endif
         | ^
   rowRanksWithTies_lowlevel_template.h:148:1: warning: embedding a directive within macro arguments is not portable
     148 | #if MARGIN == 'r'
         | ^
   rowRanksWithTies_lowlevel_template.h:150:1: warning: embedding a directive within macro arguments is not portable
     150 | #elif MARGIN == 'c'
         | ^
   rowRanksWithTies_lowlevel_template.h:152:1: warning: embedding a directive within macro arguments is not portable
     152 | #endif
         | ^
   In file included from rowRanksWithTies_lowlevel.h:30,
                    from rowRanksWithTies.c:10:
   rowRanksWithTies_lowlevel_template.h: In function ‘rowRanksWithTies_Average_int’:
   rowRanksWithTies_lowlevel_template.h:135:1: warning: embedding a directive within macro arguments is not portable
     135 | #if MARGIN == 'r'
         | ^
   rowRanksWithTies_lowlevel_template.h:137:1: warning: embedding a directive within macro arguments is not portable
     137 | #elif MARGIN == 'c'
         | ^
   rowRanksWithTies_lowlevel_template.h:139:1: warning: embedding a directive within macro arguments is not portable
     139 | #endif
         | ^
   rowRanksWithTies_lowlevel_template.h:148:1: warning: embedding a directive within macro arguments is not portable
     148 | #if MARGIN == 'r'
         | ^
   rowRanksWithTies_lowlevel_template.h:150:1: warning: embedding a directive within macro arguments is not portable
     150 | #elif MARGIN == 'c'
         | ^
   rowRanksWithTies_lowlevel_template.h:152:1: warning: embedding a directive within macro arguments is not portable
     152 | #endif
         | ^
   In file included from rowRanksWithTies_lowlevel.h:37,
                    from rowRanksWithTies.c:10:
...
HenrikBengtsson commented 1 year ago

Hmm... weird, I cannot reproduce this today, less than 24 hours later. It might have happened only for some specific commit. Closing...