Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. C1001 internal Compiler error VS 2012 pro

C1001 internal Compiler error VS 2012 pro

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiodebugginghelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    Hi I have been getting an internal compiler for a "for(;;) statement I simplified it as much as possible till it looks like this

    for (; i >= 0; i--, j--)

    and I still get the error the code compiles in debug mode thanks

    L J 2 Replies Last reply
    0
    • F ForNow

      Hi I have been getting an internal compiler for a "for(;;) statement I simplified it as much as possible till it looks like this

      for (; i >= 0; i--, j--)

      and I still get the error the code compiles in debug mode thanks

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Please show a few lines of code either side, plus the exact code that produces the error, and the exact and complete message.

      F 1 Reply Last reply
      0
      • F ForNow

        Hi I have been getting an internal compiler for a "for(;;) statement I simplified it as much as possible till it looks like this

        for (; i >= 0; i--, j--)

        and I still get the error the code compiles in debug mode thanks

        J Offline
        J Offline
        Jochen Arndt
        wrote on last edited by
        #3

        When it compiles in debug builds, the compiler gets stuck during optimisation. See also the MSDN Fatal Error C1001[^]. It suggests to disable optimisation for the function or rewrite the code. With older VS versions I had such errors a few times and solved them always by re-ordering some code lines. As you already noticed, reducing (simplifying) the code may not help. Instead it might help to add code lines.

        F 1 Reply Last reply
        0
        • J Jochen Arndt

          When it compiles in debug builds, the compiler gets stuck during optimisation. See also the MSDN Fatal Error C1001[^]. It suggests to disable optimisation for the function or rewrite the code. With older VS versions I had such errors a few times and solved them always by re-ordering some code lines. As you already noticed, reducing (simplifying) the code may not help. Instead it might help to add code lines.

          F Offline
          F Offline
          ForNow
          wrote on last edited by
          #4

          Thanks so much that did it I put pragma for optimize off

          1 Reply Last reply
          0
          • L Lost User

            Please show a few lines of code either side, plus the exact code that produces the error, and the exact and complete message.

            F Offline
            F Offline
            ForNow
            wrote on last edited by
            #5

            Jochen was right on qeue I put a pragma for optimize off Around the code and it was able to build

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups