I think the warning is correct as the resulting type of &f.c is a pointer to an array and that array is of type char[4] which has an alignment of 1. Yes f.c has an alignment of 4 but the array type has an alignment of 1.

Well, technically f.c has a type of 'char (__attribute__((aligned(4)))) [4]'.
Anyway, the point is that the variable is properly aligned, so the warning is superfluous.
Or, in other words, we need a way to tell GCC "I know this is properly aligned, so don't tell me there's a problem". The -Wcast-align warning is very useful to catch real mistakes, but there's no way to weed out the false positives.

The struct Foo looks like an odd way to try and express
union Foo
{
int i;
char c[sizeof (int)];
};
but that doesn't work either, for my 4.3.1 arm-linux build.
Neither does moving the attribute just before the ";" (either ones) or before "char" (the original or the above). Neither in C (changing reinterpret_cast to a C cast).

(In reply to comment #3)
> The struct Foo looks like an odd way to try and express
>
> union Foo
> {
> int i;
> char c[sizeof (int)];
> };
Well, that is the objective, but you can't replace int with a non-POD type in C++98. C++0x relaxes the unions and that's exactly what is intended: delayed construction.
I used int as an example, but the objective is to have:
template <typename T>
struct Buffer
{
char __attribute__((aligned(__alignof__(T)))) buf[sizeof(T)];
};
[the WebKit WTF::Vector code is a bit more complex than that to get around the fact that gcc 4.2 can't do aligned(__alignof__(T)), so it partially specialises alignments of 1, 2, 4, 8, 16, and 64]

Confirmed on latest 4.4, 4.5 and 4.6 (trunk).
Related GCC documentation on alignment of structure fields is here:
http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Variable-Attributes.html#Variable-Attributes
In the short-term, one workaround is to write the code as follows:
#include <stdio.h>
struct Foo
{
char c[sizeof(int)];
} __attribute__((aligned(4)));
char junk;
Foo f;
int main()
{
int *i = reinterpret_cast<int *>(&f);
*i = 0x44434241;
printf("%c %c %c %c", f.c[0], f.c[1], f.c[2], f.c[3]);
}
By aligning the structure Foo to 4 bytes, you can successfully cast a Foo* to an int* and then initialise all four chars in one go. (Without the type attribute for the struct Foo, you still get the warning.) My example prints "A B C D".
FYI: I have tracked down the alleged offending code mentioned in an earlier comment to build_c_cast() in c-typeck.c.