View Issue Details

IDProjectCategoryView StatusLast Update
0000510OpenFOAMBugpublic2013-03-14 09:07
Reporterlinnemann Assigned Tohenry  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
PlatformX86_64OSCentOSOS Version5.6
Summary0000510: compiling with llvm/clang fails on ambiguous errors
Descriptioncompiling with llvm/clang fails on several ambiguous errors, below is one of them.

interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C:297:21: fatal error: conversion from 'tmp<vectorField>' to 'vectorField' (aka 'Field<vector>') is ambiguous
        vectorField delta = mesh_.boundary()[patchi].delta();
Steps To ReproduceInstall clang >= 2.9 and compile OF.
Additional InformationAlso to compile scotch.h with clang the ThirdParty-2.1.x/etc/wmakeFiles/scotch/Makefile.inc files for scotch have to include the following in the CFLAGS -std=gnu89
TagsNo tags attached.

Relationships

has duplicate 0000717 resolveduser2 Clang fails to build finiteVolume, reports type conversion is ambiguous in file cylindricalInletVelocityFvPatchVectorField.C 

Activities

henry

2012-04-16 09:31

manager   ~0001252

We are having difficulty mainaining support for Clang at the moment because the way that template specialization is handled changes with every release and we have to add/change a bunch of #ifdef statements accordingly. So far we have not seen any performance advantage in using Clang so we have not been pursuing it for the moment. We will have another go at a Clang port for the next release of OpenFOAM.

linnemann

2012-04-16 09:34

reporter   ~0001253

Hi thanks for the clarification.

If there are no performance advantage, it makes little sense to maintain it.

Of course some might like the less restrictive license on the compiler.

henry

2012-04-16 09:39

manager   ~0001254

Currently there is no performance advantage but this is a young compiler which is undergoing intensive development and at some point the optimization may be better than the competition and we intend to support Clang when it is more stable.

Note that there are already some advantages in using Clang, in particular the error messages from templating are more comprehensible than from gcc, icc etc.

The license choice is not an advantage over gcc for OpenFOAM which we release GPLv3 anyway.

user458

2012-06-25 03:07

  ~0001417

Is this compiler output:

***************

/home/agl/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/GeometricBoundaryField.C:525:34: note: use '=' to turn this equality comparison into an
      assignment
        this->operator[](patchI) == bf[patchI];
                                 ^~
                                 =

***************

related to this bug? If so, then I can confirm this bug/feature still exists with Clang V3.1 on an up to date 64 bit Gentoo box compiling OF V2.1.1. I get heaps of these...... :)

henry

2012-06-25 09:39

manager   ~0001418

We will support Clang-3.1 and probably 3.2 in the next release of OpenFOAM.

Issue History

Date Modified Username Field Change
2012-04-16 09:14 linnemann New Issue
2012-04-16 09:31 henry Note Added: 0001252
2012-04-16 09:34 linnemann Note Added: 0001253
2012-04-16 09:39 henry Note Added: 0001254
2012-06-25 03:07 user458 Note Added: 0001417
2012-06-25 09:39 henry Note Added: 0001418
2012-06-25 09:39 henry Status new => closed
2012-06-25 09:39 henry Assigned To => henry
2012-06-25 09:39 henry Resolution open => fixed
2013-03-14 09:07 user2 Relationship added has duplicate 0000717