Commit d39f7c5a authored by Ralf Mueller's avatar Ralf Mueller 🎣
Browse files

avoid "variable length array folded to constant array" error with clang

parent b0fde8de
......@@ -3,10 +3,12 @@
int main(void)
{
const int nlon = 12; // Number of longitudes
const int nlat = 6; // Number of latitudes
const int nlev = 5; // Number of levels
const int nts = 3; // Number of time steps
enum {
nlon = 12, // Number of longitudes
nlat = 6, // Number of latitudes
nlev = 5, // Number of levels
nts = 3, // Number of time steps
};
size_t nmiss;
double var1[nlon*nlat];
double var2[nlon*nlat*nlev];
......
......@@ -3,10 +3,12 @@
int main(void)
{
const int nlon = 12; // Number of longitudes
const int nlat = 6; // Number of latitudes
const int nlev = 5; // Number of levels
const int nts = 3; // Number of time steps
enum {
nlon = 12, // Number of longitudes
nlat = 6, // Number of latitudes
nlev = 5, // Number of levels
nts = 3, // Number of time steps
};
size_t nmiss;
double var1[nlon*nlat];
double var2[nlon*nlat*nlev];
......
......@@ -3,10 +3,12 @@
int main(void)
{
const int nlon = 12; // Number of longitudes
const int nlat = 6; // Number of latitudes
const int nlev = 5; // Number of levels
const int nts = 3; // Number of time steps
enum {
nlon = 12, // Number of longitudes
nlat = 6, // Number of latitudes
nlev = 5, // Number of levels
nts = 3, // Number of time steps
};
size_t nmiss = 0;
double lons[] = {0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330};
double lats[] = {-75, -45, -15, 15, 45, 75};
......
......@@ -3,10 +3,12 @@
int main(void)
{
const int nlon = 12; // Number of longitudes
const int nlat = 6; // Number of latitudes
const int nlev = 5; // Number of levels
const int nts = 3; // Number of time steps
enum {
nlon = 12, // Number of longitudes
nlat = 6, // Number of latitudes
nlev = 5, // Number of levels
nts = 3, // Number of time steps
};
int nmiss = 0;
double lons[] = {0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330};
double lats[] = {-75, -45, -15, 15, 45, 75};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment