Keil Logo Arm Logo

Discussion Forum

[Compiler BUG] error: #70: incomplete type is not allowed

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Robert S
Posted
12-May-2012 11:14 GMT
Toolset
ARM
New! [Compiler BUG] error: #70: incomplete type is not allowed

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.
http://www.xup.in/dl,83570669/LoggerExampleSTM32.zip/

Does anyone have some suggestions? Is it really a compiler bug?

Robert

Read-Only
Author
Andrew Neil
Posted
12-May-2012 11:19 GMT
Toolset
ARM
New! RE: A template

So we're talking C++, then?

Are you sure you have correctly configured the compiler for C++ ?

"Is it really a compiler bug?"

http://www.catb.org/~esr/faqs/smart-questions.html#id478549

Read-Only
Author
Robert S
Posted
12-May-2012 11:22 GMT
Toolset
ARM
New! RE: A template

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?"
http://www.catb.org/~esr/faqs/smart-questions.html#id478549

I know most of the compiler bugs are sitting in front of the computer ;) But this project compiles fine using g++.

Read-Only
Author
Per Westermark
Posted
12-May-2012 13:40 GMT
Toolset
ARM
New! RE: A template

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++.

Read-Only
Author
Robert S
Posted
12-May-2012 13:53 GMT
Toolset
ARM
New! RE: A template

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.

Read-Only
Author
scott douglass
Posted
14-May-2012 14:09 GMT
Toolset
ARM
New! RE: [Compiler BUG] error: #70: incomplete type is not allowed

It's hard to tell without an example of your source, but perhaps this Knowledge Article will help: http://infocenter.arm.com/help/topic/com.arm.doc.faqs/ka3987.html

Read-Only
Author
Robert S
Posted
14-May-2012 15:33 GMT
Toolset
ARM
New! RE: [Compiler BUG] error: #70: incomplete type is not allowed

In my first posting there is a complete uVision project which generates this error.

Read-Only
Author
erik malund
Posted
14-May-2012 16:45 GMT
Toolset
ARM
New! RE: [Compiler BUG] error: #70: incomplete type is not allowed

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

Read-Only
Author
Frustrated Consultant
Posted
14-May-2012 19:21 GMT
Toolset
ARM
New! RE: [Compiler BUG] error: #70: incomplete type is not allowed

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.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.