name clash with IBM XL C/C++ compilers

Bug #1056741 reported by Paolo Crosetto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Confirmed
High
Unassigned

Bug Description

Dear all,
I am compiling dolfin with an IBM XL compiler, and I found a problem with the method 'restrict' in GenericFunctions.h, and in other places in the code. In fact restrict is a special keyword for IBM compilers, an alias for the __restrict keyword.

Revision history for this message
Joachim Haga (jobh) wrote : Re: [Bug 1056741] [NEW] name clash with IBM XL C/C++ compilers

"restrict" is a keyword in C99, but not in any C++ version. So a c++
compiler should accept it (and maybe issue a warning).

It's still a good idea to change it, though.

On 26 September 2012 11:56, Paolo Crosetto <email address hidden> wrote:
> Public bug reported:
>
> Dear all,
> I am compiling dolfin with an IBM XL compiler, and I found a problem with the method 'restrict' in GenericFunctions.h, and in other places in the code. In fact restrict is a special keyword for IBM compilers, an alias for the __restrict keyword.
>
> ** Affects: dolfin
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of DOLFIN
> Team, which is subscribed to DOLFIN.
> https://bugs.launchpad.net/bugs/1056741
>
> Title:
> name clash with IBM XL C/C++ compilers
>
> Status in DOLFIN:
> New
>
> Bug description:
> Dear all,
> I am compiling dolfin with an IBM XL compiler, and I found a problem with the method 'restrict' in GenericFunctions.h, and in other places in the code. In fact restrict is a special keyword for IBM compilers, an alias for the __restrict keyword.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dolfin/+bug/1056741/+subscriptions

Revision history for this message
Paolo Crosetto (p-crosetto) wrote :

Thanks for the prompt answer. The documentation of XL compilers says "By default all the built-in keywords defined in the C and C++ language standards are reserved as keywords". So (for other people compiling with XL) to avoid compilation errors one should add the flag: -qnokeyword=restrict

Changed in dolfin:
status: New → Confirmed
importance: Undecided → Medium
Changed in dolfin:
importance: Medium → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.