Unreachable Breaks with ICC on Windows

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unreachable Breaks with ICC on Windows

André Borchert
Hello,

ICC reports two unreachable "break;" statements as warnings:

SQLite 3.29

Windows 2019
Visual Studio 16.2.0 Preview 3.0
Intel Parallel Studio XE 2019 Update 4


1>------ Rebuild All started: Project: SQLite, Configuration: Release x64
------
1>sqlite3.c
1>D:\Dropbox\Chaos\SQLite Test\SQLite\sqlite3.c(87093): message #111:
statement is unreachable
1>    break;
1>    ^
1>
1>D:\Dropbox\Chaos\SQLite Test\SQLite\sqlite3.c(87850): message #111:
statement is unreachable
1>            break;
1>            ^
1>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Unreachable Breaks with ICC on Windows

Peter da Silva-2
I would argue that an unreachable break should not be a warning, since
leaving out the break is just asking for some beggar to come in and make it
reachable again and summon the fallthrough fairy without noticing it. :)

On Sat, Jul 13, 2019 at 9:32 AM André Borchert <[hidden email]> wrote:

> Hello,
>
> ICC reports two unreachable "break;" statements as warnings:
>
> SQLite 3.29
>
> Windows 2019
> Visual Studio 16.2.0 Preview 3.0
> Intel Parallel Studio XE 2019 Update 4
>
>
> 1>------ Rebuild All started: Project: SQLite, Configuration: Release x64
> ------
> 1>sqlite3.c
> 1>D:\Dropbox\Chaos\SQLite Test\SQLite\sqlite3.c(87093): message #111:
> statement is unreachable
> 1>    break;
> 1>    ^
> 1>
> 1>D:\Dropbox\Chaos\SQLite Test\SQLite\sqlite3.c(87850): message #111:
> statement is unreachable
> 1>            break;
> 1>            ^
> 1>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Unreachable Breaks with ICC on Windows

Richard Hipp-3
On 7/17/19, Peter da Silva <[hidden email]> wrote:
> I would argue that an unreachable break should not be a warning, since
> leaving out the break is just asking for some beggar to come in and make it
> reachable again and summon the fallthrough fairy without noticing it. :)

I replaced the unreachable "break" statements with "assert(0)".

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users