https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85117
Bug ID: 85117 Summary: ARM: Wrong Warning Emits: parameter passing for argument of type 'Handle<Unknown>' changed in GCC 7.1 Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: manjian2006 at gmail dot com Target Milestone: --- typedef enum { } Unknown; class HandleBase { public: void** m_slot; }; template<typename T> struct HandleTypes { typedef T* ExternalType; }; template<> struct HandleTypes<Unknown> { typedef long long ExternalType; }; template <class T> class Handle: public HandleBase { public: typedef typename HandleTypes<T>::ExternalType ExternalType; }; void foo(Handle<Unknown> h) { extern void bar(Handle<Unknown> h); bar(h); } The above code emits wrong warning like the title. This is caused by arm_needs_doubleword_align fails to omit TYPE_DECL when traversals the fields of a aggregate type.