When I compile my project. Errors as below show up.
app.C(1025): error C253: '?L0033': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0032': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0031': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0046': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0046': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0046': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0046': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0034': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0040': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0040': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0040': INTERNAL ERROR (UNDEFINED LABEL) app.C(1025): error C253: '?L0040': INTERNAL ERROR (UNDEFINED LABEL)
If I build the project again after these errors shows up, it builds successfully. What are these errors and how can I resove them?
Thank you all very much.
Sounds like a bug that should be reported - or at least a feature that should be properly documented! absolutely! as I said "if the errors go away you have constructed something that the optimizer (although it should) can not handle.
anyhow, what do I care, I do not optimize beyond 2 for debuggability. which brings me back to my pet peeve WHY is so much that belong in the compiler done by the optimizer YES, 'common threads is an optimizer job but why does the compiler not itself not 'optimize' mov a,xxx mov r7,a mov a,r7
Erik
"WHY is so much that belong in the compiler done by the optimizer"
The optimizer is the compiler.
It's just that the compiler performs it's job in multiple steps.
- Parsing - Constant folding - Strength reductions - ... - Code output - List output
It's just a question of writing modularized code, i.e. standard software engineering best practices. It would not be fun to maintain a compiler that performed its optimization/code generation on-the-fly at the parsing stage!
In some special cases, the front-end, optimizer and one or more back-ends have been split into separate binaries but they still form "the compiler".
let us not argue words. if you want it in another form it should be possible to get all possible optimization that does not affect program flow ("mov a,r7" jump table switches etc) without program flow (sequence combining) optimization for the simple reason of debuggability with the best possible debuggable code.
The optimizer is the compiler. as far as i know, a lot of optimizationis are done by the linker.
"The optimizer is the compiler. as far as i know, a lot of optimizationis are done by the linker."
Yes, a "tribute" to the ugly duckling. That's an exceptions to the rule and more or less a required workaround since the '51 architecture was optimized for a minimal transistor count. Most contemporary processors had the same number of transistors for just the processor core, without any timer, serial port, ...
Most compilers can define 'global optimization' as optimization within a single source file, and doesn't have to fight so desperately to convert auto variables to reused global variables.
In this case, Keil has moved a significant part of the traditional back-end into the linker.
my peeve is not related to where the optimization is, but with the inability to select "optimize everything that does not affect debugging, and nothing else". Now this may sound stupid, but if you have e.g. a timing error that show when the code is not debuggable (in the ICE) and does not show when the code is debuggable (in the ICE) you will waste an inordinate amount of time debugging by "othere means".
It is not a 'preference' issue it is a 'productivity' issue. Any bug that is simple to find the value of the ICE is not huge, but it seems that the bugs where that ICE is of great vaiue are those that only show up when optimized.
I have solved the issue by simply not selecting any optimization beyond two, this may lead to a module or two being coded in assembler which might not have been needed was the optimizer usable.