|
Prev: MAC address
Next: GetFileVersionInfo example
From: Kevin Lin on 4 Jan 2006 13:40 The following source was compiled using VS.NET 2003: template <size_t i> struct test_align1 { __declspec(align(16)) struct {} align; }; struct test_align2 { __declspec(align(16)) struct {} align; }; void funcme(test_align1<0> align) {} void funcme2(test_align2 align) {} funcme2 generates an error (formal parameter with __declspec(16)) won't be aligned) while funcme does not. Is that a compiler bug?
From: doug mansell on 5 Jan 2006 03:17 Kevin Lin wrote: > The following source was compiled using VS.NET 2003: > > template <size_t i> struct test_align1 > { > __declspec(align(16)) struct {} align; > }; > > struct test_align2 > { > __declspec(align(16)) struct {} align; > }; > > void funcme(test_align1<0> align) {} > void funcme2(test_align2 align) {} > > funcme2 generates an error (formal parameter with __declspec(16)) won't > be aligned) while funcme does not. Is that a compiler bug? > I'd say that the fact that it doesn't generate an error for funcme is a bug. doug.
|
Pages: 1 Prev: MAC address Next: GetFileVersionInfo example |