13

Iam getting the following error , could some one help me how to fix it .

fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'f:\vs70builds\3077\vc\Compiler\CxxFE\sl\P1\C\pdbmgr.cpp', line 149) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information

brickner
  • 6,595
  • 3
  • 41
  • 54
somaraj
  • 949
  • 1
  • 9
  • 10
  • 2
    Why is this downvoted/vote to close? Seems a fair question to me, even though there's no good answer to it – jalf Jul 07 '09 at 11:03
  • 1
    Yeap, a very real question especially if you have been in this situation several times. – sharptooth Jul 07 '09 at 11:07
  • 1
    @Neil: Not so lazy. It's typical to violate language grammar and get the compiler spawn error messages. It's not that typical to see a message saying that the compiler in fact refuses to compile perfectly correct code. – sharptooth Jul 07 '09 at 11:09
  • Can you come up with a small segment of code that reproduces this particular C1001? Also, does this appear with newer Visual Studio versions? – LThode Nov 05 '14 at 21:15

4 Answers4

5

INTERNAL COMPILER ERROR(compiler file file, line number) The compiler cannot generate correct code for a construct, probably due to the combination of an expression and an optimization option. Try removing one or more optimization options and recompiling the function containing the line indicated in the error message. You can probably fix the problem by removing one or more optimization options. To determine which option is at fault, remove options one at a time and recompile until the error message goes away. The options most commonly responsible are /Og, /Oi, and /Oa. Once you determine which option is responsible, you can disable it using the optimize pragma around the function where the error occurs and continue to use the option for the rest of the module. The Microsoft Knowledge Base has more information about C1001; see http://support.microsoft.com/default.aspx?scid=kb;en-us;134650.

3

Nope, you're screwed. You've done something that exposed an error in the compiler. Play with optimization settings, #pragmas and fiddling with your code until it works.

And perhaps submit a bug report on connect.microsoft.com

jalf
  • 243,077
  • 51
  • 345
  • 550
1

That's a very unfortunate thing. Such indications appear once in a while for no apparent reason. Even MSDN recommends to go to the code and play with optimization pragmas there. You have to detect what construct causes this indication and rewrite it somehow. Or you can use a newer version of VC++.

sharptooth
  • 167,383
  • 100
  • 513
  • 979
0

The other answers are right, you can try to work around a compiler error, but it is still there. To add, in the meantime Microsoft introduces an automatic error report so that the can know about these errors and might be able to fix them in a future release. The flag is called /errorReport.

See https://learn.microsoft.com/de-de/cpp/build/reference/errorreport-report-internal-compiler-errors?view=vs-2019

usr1234567
  • 21,601
  • 16
  • 108
  • 128