Skip to contentSkip to conversation

MSVC "parser stack overflow"

Openvpn-devel Gisle Vanem 3 participants 6 messages Dec 9, 2015 – Dec 10, 2015

lore
Share & tools
lore
#0 lore raw

While compiling src/openvpn/options.c with MSVC 2015, I got this
error:
src/openvpn/options.c(5944): fatal error C1026: parser stack overflow, program too complex

I've also seen such error in GeoIP-lib due to all the 'if..else if' statements. Can this be written using some kind of a table-lookup code instead?

Signature · 1 line
--gv
#1 lore raw

Hi,

Quoted 6 lines · Gisle Vanem

While compiling src/openvpn/options.c with MSVC 2015, I got this
error:
src/openvpn/options.c(5944): fatal error C1026: parser stack overflow, program too complex

I've also seen such error in GeoIP-lib due to all the 'if..else if' statements. Can this be written using some kind of a table-lookup code instead?

We could, certainly, if we had nothing else to do.

For the time being we just use a compiler that is not mainly a pain in the back, solidly stuck in the last century before C99 - as in, none of the core developers compile on windows, we all do cross-compilation with mingw64 on Linux.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#2 lore raw

Am 10.12.15 um 09:36 schrieb Gert Doering:

Quoted 7 lines

Hi,

Quoted 4 lines · Gisle Vanem

While compiling src/openvpn/options.c with MSVC 2015, I got this
error:
src/openvpn/options.c(5944): fatal error C1026: parser stack overflow, program too complex

Quoted 9 lines
Quoted 2 lines

I've also seen such error in GeoIP-lib due to all the 'if..else if' statements. Can this be written using some kind of a table-lookup code instead?

We could, certainly, if we had nothing else to do.

For the time being we just use a compiler that is not mainly a pain in the back, solidly stuck in the last century before C99 - as in, none of the core developers compile on windows, we all do cross-compilation with mingw64 on Linux.

Or use the experimental Clang frontend for MSVC codegen

http://blogs.msdn.com/b/vcblog/archive/2015/12/04/introducing-clang-with-microsoft-codegen-in-vs-2015-update-1.aspx

As Gert said, that code is old, reliable and well tested. And just about quirky enough that it is no straighforward table-lookup code conversion.

Arne

#3 lore raw
In reply to Gert Doering
Quoted 4 lines · Gert Doering

For the time being we just use a compiler that is not mainly a pain in the back, solidly stuck in the last century before C99 - as in, none of the core developers compile on windows, we all do cross-compilation with mingw64 on Linux.

Well, MSVC 2015 is pretty up-to-date WRT C99. So I think you should remove all the *.vcxproj and msvc-*.bat files to prevent more people getting the impression you care about Windows.

Signature · 1 line
--gv
#4 lore raw

Am 10.12.15 um 10:58 schrieb Gisle Vanem:

Quoted 10 lines
Quoted 4 lines · Gert Doering

For the time being we just use a compiler that is not mainly a pain in the back, solidly stuck in the last century before C99 - as in, none of the core developers compile on windows, we all do cross-compilation with mingw64 on Linux.

Well, MSVC 2015 is pretty up-to-date WRT C99. So I think you should remove all the *.vcxproj and msvc-*.bat files to prevent more people getting the impression you care about Windows.

Please note that we are an open source project and have thinly spread resources. These files still work with older versions. Feel free to submit patches that fix MSVC 2015 support.

Arne

#5 lore raw
In reply to Gisle Vanem

Hi,

Quoted 10 lines · Gisle Vanem
Quoted 4 lines · Gert Doering

For the time being we just use a compiler that is not mainly a pain in the back, solidly stuck in the last century before C99 - as in, none of the core developers compile on windows, we all do cross-compilation with mingw64 on Linux.

Well, MSVC 2015 is pretty up-to-date WRT C99. So I think you should remove all the *.vcxproj and msvc-*.bat files to prevent more people getting the impression you care about Windows.

We provide a working build environment to make windows binaries.

We also provided working MSVC files that worked fine until Microsoft broke their compiler - all older versions of MSVC can compile OpenVPN just fine (we actually have quite a few commits in our tree to make compilation with MSVC work, given it's non-support of this or that which works perfectly well with gcc or clang).

But we're not going to invest large efforts into fixing something that Microsoft broke. If you find the magic option to increase their stack size which needs to be added to the vcxproj file - we're happy to add that, but the onus for "it breaks with MSVC" is on who wants that environment.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...