News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Internal error (is it a bug?)

Started by iZzz32, December 04, 2007, 05:56:33 PM

Previous topic - Next topic

iZzz32


typedef int (foo)(int);

int main(void)
{
    foo bar = baz; // I know -- this is an error, I missed '*' before 'bar'.
    return 0;
}

produces the following messages:

test.c(13): error #2043: Illegal initialization of 'extern bar'.           <- OK.
test.c(13): error #2031: Addressable object required.                      <- What does it mean?
test.c(13): fatal error: Internal error: 'Access violation' at 0x0041701d. <- Is it a bug?

DMac

#1
typedef int (*foo)(int); // declared function pointer to point to an object's address

int baz (int i){return 0;} // declare an addressable object

int main(void)
{
    foo bar = baz; // now the symbol baz is an addressable object and foo points to it
    return 0;
}
No one cares how much you know,
until they know how much you care.

Pelle

A bug, I guess; can happen when the compile has already failed, so no show-stopper, but obviously looks better if it doesn't happen. Anyway, it seems I have already fixed this in the new version...
/Pelle

AlexN

Quote from: Pelle on December 05, 2007, 08:13:44 AM
Anyway, it seems I have already fixed this in the new version...

Witch new version?  :)
best regards
Alex ;)

Stefan Pendl

Quote from: AlexN on December 05, 2007, 08:27:01 AM
Witch new version?  :)
The one Pelle is currently working on, which will support x64 too.
---
Stefan

Proud member of the UltraDefrag Development Team

Pelle

Yup. I'm on the final 5% - which seems to take the 'usual' 95% of the time...  ::)
/Pelle

Christian

I am looking forward this new version  ;D

Pelle, could you tell something about the planned changes within the announcements?
www.pellesc.de - German PellesC mirror (now available in german and english)

Pelle

Maybe easier to list what hasn't change...  ::)

Here is a partial list...
* support for AMD64/X64/X86-64/whatever you like to call it... (obviously...)
* no support for Windows 9X in POIDE, and probably most tools except POLINK & POLIB...
* support for C99 complex math...
* support for "safer" C runtime functions from ISO TR24731-1...
* basic "locale" support...
* some 30 -40 new compiler intrinsic functions...
* Windows Vista support...
/Pelle

ssb

Quote from: Pelle on December 05, 2007, 04:34:25 PM
* Windows Vista support...

Great! I was looking for that. I've experienced too many issues with IDE since I've installed Vista.