discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Difference between GCC 2.95 and GCC3.1


From: Tom Hageman
Subject: Re: Difference between GCC 2.95 and GCC3.1
Date: Fri, 28 Jun 2002 00:23:33 +0200

On Sun, 23 Jun 2002 18:33:05 +0100, Richard Frith-Macdonald wrote:
> On Sunday, June 23, 2002, at 05:52 PM, Ravindra wrote:
>
> > While moving from GCC 2.95 to GCC 3.1, we observed a problem when
> > special characters(like - or :) were part of the Value in a
> > dictionary.
> > In GCC 2.95 the following program prints {EX = "-16";}, where as in
> > GCC3.1 prints it as {EX = -16;}
> > Because of the missing of double quotes in GCC3.1, unarchiving the
> > archived objects at client side is failing.
> >
> >
> > *************************************************************************
> > *****************
> > #import <Foundation/Foundation.h>
> > int main (int argc, const char *argv[])
> > {
> >     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
> >     NSMutableDictionary *thePlist = [NSMutableDictionary dictionary];
> >     [thePlist setObject:@"-16" forKey:@"EX"];
> >     NSLog(@"The Plist is %@",thePlist);
> >     [pool release];
> >     exit(0); // insure the process exit status is 0
> > }
> >
> > *************************************************************************
> > *******************
> >
> > We observed that setQuotables in NSString.m was changed from
> >
> >  s = [[NSCharacterSet characterSetWithCharactersInString:
> > @"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz$./_"]
> > mutableCopy];   -- in GCC 2.95
> > to        s = [[NSCharacterSet

> > characterSetWithCharactersInString:@"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
> >  @"abcdefghijklmnopqrstuvwxyz!#$%&*+-./:?@|~_^"] mutableCopy];  -- in
> > GCC 3.1
> > If there is any specific reason behind this change, please let us
> > know.
>
> 1. This has nothing to do with gcc versions - it's GNUstep versions.
>
> 2. The change is a bugfix ... the old version was incorrect, quoting
> character which
> should not be quoted.

Are you sure it was a bug?  On OPENSTEP 4.2 the output of the above test  
program is:

Jun 27 23:49:59 gnustep-plist-test[4564] The Plist is {EX = "-16"; }

Testing some plist variants:

% pl -h
pl {-input <binary_file>} {-output <binary_file>}
        Reads ASCII PL from stdin (or serialized file if -input specified)
        and writes ASCII PL to stdout (or serialized file if -output)

% echo '{EX = "-16"; }' | pl
{EX = "-16"; }

% echo '{EX = -16; }' | pl
Jun 28 00:18:05 pl[6051] *** Uncaught exception: <NSParseErrorException>  
*** xObject expected;
Parse error line 1 (position 7) for units: (xObject, Dictionary,  
parseDictionary, xObject);
Next token is '-'
stack: 0x1805e00c 0x1805dece 0x507dde4 0x507e014 0x1805b2ea 0x1805a062  
0x18059fd6 0x180528b4 0x18007c1c 0x18007cf6 0x180065a4 0x1800651a  
0x1800250a 0x1800252a 0x1800325c 0x1800253c 0x18007bd8 0x18017748 0x3452
exiting!

--
__/__/__/__/  Tom Hageman  <trh@xs4all.nl> (home)  [NeXTmail/Mime OK]
  __/ __/_/         <t.hageman@proteon.nl> (work)  [Mime OK]
 __/__/__/
__/  _/_/                                              [ObjC retain];
objc: FREED(id): message retain sent to freed object=0xdeadcafe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]