MPAS-Dev / MPAS-Model

Repository for MPAS models and shared framework releases.
238 stars 317 forks source link

Update gen_inc.c to compile with Intel compilers #1115

Closed dimomatt closed 11 months ago

dimomatt commented 1 year ago

The Intel C compiler does not default to C99 standards. Introduced in C99 was the addition of variable declarations within 'for' loops. As a result, when compiling with the default Intel compiler flags, the variable declaration in the 'for' loop on line 143 failed to compile. This commit updates the file to declare the variable the line before, like the other 'for' loops in the file.

The code is now verified to be compliant with C99 standards, and compiles with the Intel Make target.