Unnested loops and /Zm... wheres it gone?
Thanks
Adam Vanner
Thanks
Are you using VC8.0?
/Zm makes you specify a scaling factor that determines the compiler's memory allocation limit for the precompiled header.
C1061 should only be issued if nesting of code blocks exceeds the limit of 128 nesting levels (an not unnested loops).
Could you please provide a repro case by preprocessing the file causing the problem (to preprocess the file, use the /P compiler option).
Thanks,
Ayman shoukry
VC++
Thanks for your reply-
C1061 is being generated by a 265kb source file (from NVidia OGL SDK, glh_genext.h), so I won't be able to post it all- however, heres a random snippet- the file goes on in this way- it uses macros for wglGetProcAddress to defne requested extension function pointers. Havent counted the number of (un)nests (obviously dependant on the number of extensions allowed) but as its a 265kb file, theres probably more than 250.
Using /Zm"500" definately fixed this in vc7.0, and doesn't in 8.0
And yes, I am using vc8. Thanks a bunch #ifdef
Ad
...
} else if (0 == strcmp(extension, "GL_ARB_shadow")) {
#endif
#ifdef
GL_ARB_shadow_ambient}
else if (0 == strcmp(extension, "GL_ARB_shadow_ambient")) {#endif
#ifdef
GL_ARB_texture_border_clamp}
else if (0 == strcmp(extension, "GL_ARB_texture_border_clamp")) {#endif
#ifdef
GL_ARB_texture_compression}
else if (0 == strcmp(extension, "GL_ARB_texture_compression")) {GLH_EXT_NAME(glCompressedTexImage3DARB) = (PFNGLCOMPRESSEDTEXIMAGE3DARBPROC)GLH_EXT_GET_PROC_ADDRESS(
"glCompressedTexImage3DARB"); if (NULL == GLH_EXT_NAME(glCompressedTexImage3DARB)) return GL_FALSE;GLH_EXT_NAME(glCompressedTexImage2DARB) = (PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)GLH_EXT_GET_PROC_ADDRESS(
"glCompressedTexImage2DARB"); if (NULL == GLH_EXT_NAME(glCompressedTexImage2DARB)) return GL_FALSE;GLH_EXT_NAME(glCompressedTexImage1DARB) = (PFNGLCOMPRESSEDTEXIMAGE1DARBPROC)GLH_EXT_GET_PROC_ADDRESS(
"glCompressedTexImage1DARB"); if (NULL == GLH_EXT_NAME(glCompressedTexImage1DARB)) return GL_FALSE;GLH_EXT_NAME(glCompressedTexSubImage3DARB) = (PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC)GLH_EXT_GET_PROC_ADDRESS(
"glCompressedTexSubImage3DARB"); if (NULL == GLH_EXT_NAME(glCompressedTexSubImage3DARB)) return GL_FALSE;GLH_EXT_NAME(glCompressedTexSubImage2DARB) = (PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC)GLH_EXT_GET_PROC_ADDRESS(
"glCompressedTexSubImage2DARB"); if (NULL == GLH_EXT_NAME(glCompressedTexSubImage2DARB)) return GL_FALSE;GLH_EXT_NAME(glCompressedTexSubImage1DARB) = (PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC)GLH_EXT_GET_PROC_ADDRESS(
"glCompressedTexSubImage1DARB"); if (NULL == GLH_EXT_NAME(glCompressedTexSubImage1DARB)) return GL_FALSE;GLH_EXT_NAME(glGetCompressedTexImageARB) = (PFNGLGETCOMPRESSEDTEXIMAGEARBPROC)GLH_EXT_GET_PROC_ADDRESS(
"glGetCompressedTexImageARB"); if (NULL == GLH_EXT_NAME(glGetCompressedTexImageARB)) return GL_FALSE;#endif
#ifdef
GL_ARB_texture_cube_map}
else if (0 == strcmp(extension, "GL_ARB_texture_cube_map")) {#endif
#ifdef
GL_ARB_texture_env_add}
else if (0 == strcmp(extension, "GL_ARB_texture_env_add")) {#endif
#ifdef
GL_ARB_texture_env_combine}
else if (0 == strcmp(extension, "GL_ARB_texture_env_combine")) {#endif
...
/Zm only affects the max memory alloc for precompiled headers.
Are you sure the header didn't change?
Thanks,
Ayman Shoukry
VC++