On Mar 3, 2012, at 1:47 PM, Richard Smith wrote:
> Hi,
>
> This asserts in cases where memset is given a pointer to incomplete type.
> Testcase:
>
> typedef unsigned long size_t;
> typedef struct _snd_pcm_hw_params snd_pcm_hw_params_t;
> size_t snd_pcm_hw_params_sizeof(void);
> #define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params)
> #define __snd_alloca(ptr,type) do { *ptr = (type##_t *)
> alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0)
> int sa_stream_open() {
> snd_pcm_hw_params_t* hwparams;
> snd_pcm_hw_params_alloca(&hwparams);
> }
>
Fixed in r151993, thanks!
-Chris
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits