[Insight-developers] -Wover-aligned warnings on Rogue7 dashboard

Sean McBride sean at rogue-research.com
Tue May 21 11:07:40 EDT 2013


Hi all,

My Rogue7 dashboard has a few warnings from clang's -Wover-aligned:

<http://open.cdash.org/viewBuildError.php?type=1&buildid=2911702>

I'm not a language lawyer, but these look legit to me.  Since I build as C++11 I fall into:

#define ITK_CACHE_LINE_ALIGNMENT 64

# define itkAlignedTypedef( alignment, oldtype, newtype )   \
  typedef oldtype newtype alignas(alignment)

The standard says this about operator new: "The pointer returned shall be suitably aligned so that it can be converted to a pointer of any complete object type with a fundamental alignment requirement."  std::max_align_t has the strictest fundamental alignment, and, on my system anyway, it's smaller than 64.

Is ITK_CACHE_LINE_ALIGNMENT only for performance?  Maybe it should be removed?

Thanks,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the Insight-developers mailing list