Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, DotBot, Google, Sogou

Members: 0
Guests: 15
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
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 >>