amcphail / hmatrix-gsl-stats

GSL Statistics functions for Haskell hmatrix
BSD 3-Clause "New" or "Revised" License
6 stars 3 forks source link

Build failure with version 0.3 #6

Closed snoyberg closed 9 years ago

snoyberg commented 9 years ago
lib/Numeric/GSL/distribution-aux.c:35:13:
     error: ‘for’ loop initial declarations are only allowed in C99 mode
       case 0: { for (int i = 0; i < rs; i ++) r[i] = gsl_ran_landau(rng); break; }
                 ^

lib/Numeric/GSL/distribution-aux.c:35:13:
     note: use option -std=c99 or -std=gnu99 to compile your code
lib/Numeric/GSL/distribution-aux.c: In function ‘random1_v’:

lib/Numeric/GSL/distribution-aux.c:96:13:
     error: ‘for’ loop initial declarations are only allowed in C99 mode
       case 0: { for (int i = 0; i < rs; i ++) r[i] = gsl_ran_gaussian(rng,par); break; }
                 ^

lib/Numeric/GSL/distribution-aux.c:97:13:
     error: ‘for’ loop initial declarations are only allowed in C99 mode
       case 1: { for (int i = 0; i < rs; i ++) r[i] = gsl_ran_exponential(rng,par); break; }
                 ^

lib/Numeric/GSL/distribution-aux.c:98:13:
     error: ‘for’ loop initial declarations are only allowed in C99 mode
       case 2: { for (int i = 0; i < rs; i ++) r[i] = gsl_ran_laplace(rng,par); break; }
                 ^

lib/Numeric/GSL/distribution-aux.c:99:13:
     error: ‘for’ loop initial declarations are only allowed in C99 mode
       case 3: { for (int i = 0; i < rs; i ++) r[i] = gsl_ran_cauchy(rng,par); break; }
amcphail commented 9 years ago

This should be fixed by https://github.com/amcphail/hmatrix-gsl-stats/commit/61d1a25f444f78ec73b9a4f65e011c968300b24e