I'm wondering if the following is valid C, and/or valid GNU C. Something like: /* Returns a new malloced buffer in *OUTP. */ void target_read_memory (unsigned long addr, int len, unsigned char **outp); void bar () { char *str; ... target_read_memory (addr, len, (unsigned char **) &str); ^^^^^^^^^^^^^^^^^^^^^^^ // follows uses of str as a C string strlen (str); sscanf (str, ...); } chars are involved, but the cast is from a pointer to pointer, to another pointer to pointer, so I end up confused whether the char-aliases-everything rule kicks in around "str". gcc doesn't complain even with -fstrict-aliasing -O3, and I can imagine that if this didn't work, the world would break, but, from a language perspective, is that actually valid? If not, does gcc support this as a GNU C extension? -- Pedro Alves