bugGnome Chemistry Utils - Bugs: bug #53948, Build failure with Clang

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #53948: Build failure with Clang

Submitter:  Koop Mast <kwm>
Submitted:  Sun 20 May 2018 03:37:26 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Mon 21 May 2018 05:51:59 AM UTC, comment #1: 

I'm finding this quite strange for viarious reasons, but g++ also accepts static_cast.
Anyway this project is dead because I'm now retired from professional life and nobody else stepped in durably.

Jean Bréfort <jean_brefort>
Group administrator
Sun 20 May 2018 03:37:26 PM UTC, original submission:  

% clang -v
FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

spacegroup.cc:343:36: error: reinterpret_cast from 'nullptr_t' to 'gcu::Transform3d *' is not allowed
        return (i == m_Transforms.end())? reinterpret_cast <Transform3d *> (NULL): *i;
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
spacegroup.cc:351:37: error: reinterpret_cast from 'nullptr_t' to 'gcu::Transform3d *' is not allowed
        return (i == m_Transforms.end ())? reinterpret_cast <Transform3d *> (NULL): *i;
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

Replacing the reinterpret_cast with static_cast makes the build continue without any errors. I'm not sure if this is correct or not due my very very limited c++ knowledge.

Koop Mast <kwm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #44186:  patch-libs_gcu_spacegroup.cc added by kwm (744B - text/x-c++src)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kwm (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-20 kwm Attached File- Added patch-libs_gcu_spacegroup.cc, #44186

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code