Stop uflacs from generating unused variables

Issue #117 resolved
Martin Sandve Alnæs created an issue

A few cases such as the points array can be generated but not used. This stops us from compiling dolfin demos together with uflacs generated code with strict flags.

Ping @garth-wells .

Comments (11)

  1. Martin Sandve Alnæs reporter

    I disagree on setting this as a duplicate. This is on code generation, the other is on test system reporting.

  2. Jan Blechta

    @martinal, could you bump the priority here? The fix for #112 and #120 breaks DOLFIN tests unless this is fixed. And I need to merge these fixes into tsfc branch.

  3. Martin Sandve Alnæs reporter

    I've tried to inject #pragma gcc diagnostic lines to disable it locally but gcc has long standing bugs on this feature. So that didn't work out.

    An alternative temporary fix would be to set something like -Wno-unused-variable in dolfin... It's really not unreasonable that code generation results in a few unused variables. The C++ compiler will remove them anyway...

    But I will take a look.

  4. Log in to comment