Thread overview | ||||||
---|---|---|---|---|---|---|
|
March 08, 2005 DMD 0.116 warning: statement is not reachable | ||||
---|---|---|---|---|
| ||||
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 |
March 08, 2005 Re: DMD 0.116 warning: statement is not reachable | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vathix | > It also won't output an obj file if there's a warning.
Definitely not upgrading until 0.117 then.
|
March 08, 2005 Re: DMD 0.116 warning: statement is not reachable | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vathix | 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
|
March 09, 2005 Re: DMD 0.116 warning: statement is not reachable | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | 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.
|
Copyright © 1999-2021 by the D Language Foundation