lapacke.h uses // comments preventing compilation with -ansi

Open discussion regarding features, bugs, issues, vendors, etc.

lapacke.h uses // comments preventing compilation with -ansi

Postby wryanlivingston » Mon Oct 13, 2014 11:17 am

Hi all,

If one looks in LAPACK/lapacke/include/lapacke.h there are a few C++ style comments using "//" rather than "/* */". When including lapacke.h in a build that uses a strict C mode (e.g. -ansi with gcc) this results in compilation errors. Would it be feasible to turn those into /* */ comments?

Thanks,
W. Ryan Livingston

Code: Select all
/* foo.c */
#include "lapacke.h"

% gcc -c foo.c -I/path/to/LAPACK/lapacke/include/ -ansi
In file included from foo.c:14:0:
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:9903:1: error: expected identifier or '(' before '/' token
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:9903:10: error: too many decimal points in number
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:10342:1: error: expected identifier or '(' before '/' token
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:10342:10: error: too many decimal points in number
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:10656:1: error: expected identifier or '(' before '/' token
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:10656:10: error: invalid suffix "X.X" on floating constant
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:11677:1: error: expected identifier or '(' before '/' token
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:11677:11: error: too many decimal points in number
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:11718:11: error: too many decimal points in number
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:11750:11: error: invalid suffix "X.X" on floating constant
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:16028:1: error: expected identifier or '(' before '/' token
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:16028:11: error: too many decimal points in number
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:16273:1: error: expected identifier or '(' before '/' token
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:16273:11: error: too many decimal points in number
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:16413:1: error: expected identifier or '(' before '/' token
/local/lapacke/lapack-3.5.0/lapacke/include/lapacke.h:16413:11: error: too many decimal points in number
wryanlivingston
 
Posts: 3
Joined: Sun Oct 05, 2014 10:00 am

Re: lapacke.h uses // comments preventing compilation with -

Postby rodney » Mon Oct 13, 2014 4:09 pm

Ryan,

You could alternatively use the -std=c99 option to conform to the ISO C99 standard, which added // as a valid comment prefix.

Rodney
rodney
 
Posts: 49
Joined: Thu Feb 10, 2011 8:20 pm
Location: Colorado College


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 4 guests