I'm porting a logger framework to KEIL arm compiler.
Unfortunatly I get an error:
logging/Logger.h(90): error: #70: incomplete type is not allowed
But to my knowledge, there should not be an error. A template is using a forward declarated type inside. As this type is part of the template definition it's template dependent. For this reason it should be possible to use this type.
Only independ types must be fully defined before using it. Keil compiler should do a two-phase-lookup but I'm not sure if that is implemented properly.
Here is a zip archive of my project from ehich you can reproduce the error. www.xup.in/.../
Does anyone have some suggestions? Is it really a compiler bug?
Robert
So we're talking C++, then?
Are you sure you have correctly configured the compiler for C++ ?
"Is it really a compiler bug?"
www.catb.org/.../smart-questions.html
So we're talking C++, then? Yes.
Are you sure you have correctly configured the compiler for C++ ? I think so. main.cpp C++, and also in its file configuration it says C++.
"Is it really a compiler bug?" www.catb.org/.../smart-questions.html
I know most of the compiler bugs are sitting in front of the computer ;) But this project compiles fine using g++.
Except that g++ if riddled with extensions that are not part of the C++ standard, so what works in g++ need not be valid C++.
I compiled using the -ansi flag of g++ so I assume g++ is a valid Ansi C++ compiler. Except that Ansi C++ doesn't support long long values everything compiles and links perfectly.
It's hard to tell without an example of your source, but perhaps this Knowledge Article will help: infocenter.arm.com/.../ka3987.html
In my first posting there is a complete uVision project which generates this error.
In my first posting there is a complete uVision project which generates this error. do you REALY expect someone to run a complete project to see your error for free this is not Keil support it is Keil users helping each other. for Keil support use the support route for help here show a snippet that show the issue
Erik
do you REALY expect someone to run a complete project to see your error for free...
Maybe I was just curious. Maybe I was just bored. I did download it and give it a try. Very little there, but unfortunately I don't think I can help.
Sorry.
Erik may well be right with his suggestion of you contacting Keil support.