← Back to team overview

dolfin team mailing list archive

Re: CXXFLAGS

 

On Fri, Sep 09, 2005 at 05:34:21PM +0200, Garth N. Wells wrote:

> In configure.ac there is a comment that the flag -pedantic should be
> used, but it breaks when including mpio.h, which isn't included
> anymore.  The only place that -pedandtic gives proplems is in
> elasticity-updated. If that gets sorted out, we could add -pendantic
> to CXXFLAGS again.
>   Garth

Ok, I've fixed this. Apparently variable-sized arrays are not
supported in the C++98 standard, but they are in the C99 standard.

Let's try to keep away from C-style arrays in user code. I've had to
replace this code:

for(...)
{
  int dofs[element1.spacedim()];
}

with this code:

{
  int *dofs = new int[element1.spacedim()];
  for(...)
  {
  }
  delete dofs;
}

which is just horrible. What I did should be provided by Function soon
though, so the code will be removed when that happens.

  Johan



References