icc 7.1 -DD and gsl

icc 7.1 -DD and gsl

Anyone knows why icc -DD doesn't work with gsl?
The error is:

/usr/include/gsl/gsl_linalg.h(457): error: expected a ")"
gsl_linalg_balance_columns (gsl_matrix * A, gsl_vector * D);

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi,

I downloaded gsl-1.4.tar.gz. I ran ./configure (ie configure using gcc) and then make CC=icc using icc 8.0. I didn't see any problems, all files compiled & library was created.

This isnt' a compiler error. When you compile w/ icc -DD, the preprocessor replaces
gsl_linalg_balance_columns (gsl_matrix * A, gsl_vector * D);
with
gsl_linalg_balance_columns (gsl_matrix * A, gsl_vector * 1);

which isn't a valid C program.
This generates the preprocessed file & greps for gsl_linalg_balance
icc -c /tmp/bar.cxx -I/tmp/gsl/gsl-1.4/gsl -I. -DD -E | grep gsl_linalg_balance_columns
gsl_linalg_balance_columns (gsl_matrix * A, gsl_vector * 1);

Adding -DD flag, causes both icc & gcc to fail:

icc -c /tmp/bar.cxx -I/tmp/gsl/gsl-1.4/gsl -I. -DD
/tmp/gsl/gsl-1.4/gsl/gsl_linalg.h(457): error: expected a ")"
gsl_linalg_balance_columns (gsl_matrix * A, gsl_vector * D);

gcc -c /tmp/bar.cxx -I/tmp/gsl/gsl-1.4/gsl -I. -DD
In file included from /tmp/bar.cxx:1:
/tmp/gsl/gsl-1.4/gsl/gsl_linalg.h:457: syntax error before numeric constant

I don't understand the details of the library, is there a reason to use -DD to build ?

Regards
John O'Neill

Leave a Comment

Please sign in to add a comment. Not a member? Join today