Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Naver

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » GCC 4.4
Forum Rules | Mark all | Recent Posts

GCC 4.4
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jun 4, 2009, 4:46 pm
Go to the top of the page
Go to the bottom of the page

Zarius
Apprentice
GroupMembers
Posts69
JoinedApr 23, 2002

Not sure if anyone is using this version yet, its the current version of gcc in both Archlinux and Gentoo, but it breaks compile on 2.11. I will fix it up and send a list of fixes to the list. One that is glaring is that in save.cpp when it saves condition it tries to save condition[3], but it exceeds the bounds since MAX_COND is 3. The rest of the errors are the usual const char conversion errors and uninitialized variables.
       
Post is unread #2 Jun 5, 2009, 3:36 pm
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Hmmm, so we have enforced bounds checking in C now? Interesting... One assumes you have condition[MAX_COND] declared somewhere, and thus your loop should be < MAX_COND, not <=.

I wonder what that will do to my mud, where I have something like this:

const char ** sector_types_ = { "teleport", "indoors", "grassland", "hills" };
const char ** sector_type = &sector_types_[1];


Yes, that really does mean sector_type[-1] works, as -1 is the integer value for teleport rooms.
Yes, I agree using -1 was dumb, but that wasn't my choice. :)
       
Post is unread #3 Jun 5, 2009, 4:29 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Hmmm, so we have enforced bounds checking in C now? Interesting...

Many compilers do this, it's pretty easy to see at compile time that an array of constant size 5 can't (well, really shouldn't) be indexed into constant index 20. It doesn't do anything fancy at runtime though.
       
Post is unread #4 Jun 6, 2009, 4:33 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

http://www.smaugmuds.org/index.php?a=topic&t=3805

GCC 4.3 caught one already that's been dealt with awhile back. So this isn't completely new, but may be getting more strict.
       
Pages:<< prev 1 next >>