無名namespace内でのtypedefについてなんですが、以下のコードは正しいでしょうか?

#include <iostream>
namespace{
typedef unsigned long ulong;
typedef unsigned int uint;
typedef unsigned short ushort;
typedef unsigned char uchar;
}
ulong a() { return 1; }
uint b() { return 2; }
ushort c() { return 3; }
uchar d() { return 4; }
int main(int argc, char** argv)
{
a(); b(); c(); d();
return 0;
}

これをCygwinのg++ 3.4.4でコンパイルすると
error: `uint' does not name a type
error: `ushort' does not name a type
というエラーが出ます(ulong, ucharについては何もエラーが出ません)。
ただし、#include <iostream> の行をコメントアウトするか、関数 a(), b(), c(), d() を無名namespace内に入れると
コンパイルが通ります。

これはCygwinのg++がおかしいのか、それともコードに問題があるのか、どっちなんでしょうか?