GCC 4.6
bearophile
bearophileHUGS at lycos.com
Sat Oct 30 17:03:35 PDT 2010
Walter:
> bearophile wrote:
> >> The -Wshadow option now warns if a local variable or type declaration shadows another
> >> type in C++. Note that the compiler will not warn if a local variable shadows a
> >> struct/class/enum, but will warn if it shadows an explicit typedef.
> >
> > This seems interesting.
>
> Yeah, D has had that for 10 years now.
Let's focus our attention on what DMD "lacks", instead! :-) If you focus only on your strong points you will not improve yourself, this is a basic rule for any serious artist or athlete.
Regarding that feature, this program shows no warnings, is this a bad example?
alias int foo;
struct bar {}
void main() {
int foo;
int bar;
}
Bye,
bearophile
More information about the Digitalmars-d
mailing list