digitalmars.D.bugs - DMD 0.116 warning: statement is not reachable
- Vathix <vathix dprogramming.com> Mar 07 2005
- "Jarrett Billingsley" <kb3ctd2 yahoo.com> Mar 08 2005
- Vathix <vathix dprogramming.com> Mar 08 2005
- Ivan Cibiri <Ivan_member pathlink.com> Mar 08 2005
void foo(int num)
{
if(num == 2)
return;
printf("foo!\n"); // Line 5.
}
int main()
{
foo(1);
return 0;
}
dmd -w -c test
warning - test.d(5): statement is not reachable
It also won't output an obj file if there's a warning.
- Chris
Mar 07 2005
It also won't output an obj file if there's a warning.
Definitely not upgrading until 0.117 then.
Mar 08 2005
On Tue, 8 Mar 2005 16:14:25 -0500, Jarrett Billingsley <kb3ctd2 yahoo.com> wrote:It also won't output an obj file if there's a warning.
Definitely not upgrading until 0.117 then.
Since warnings have to be manually enabled with -w it's not such a big deal.
Mar 08 2005
It seems to be a warning bug also in this situation:
int main() { // Line 1
int i = 1;
if(i == 1) {
throw new Error("err 1");
}
i += 5; //Line 6
return 0;
}
dmd -w test.d
warning - test.d(6): statement is not reachable
Ivan.
In article <opsnapvzo5kcck4r esi>, Vathix says...
void foo(int num)
{
if(num == 2)
return;
printf("foo!\n"); // Line 5.
}
int main()
{
foo(1);
return 0;
}
dmd -w -c test
warning - test.d(5): statement is not reachable
It also won't output an obj file if there's a warning.
- Chris
Mar 08 2005









Vathix <vathix dprogramming.com> 