Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-21 Thread Joerg Schilling
Stephen Hahn <[EMAIL PROTECTED]> wrote: > > This reminds me of to ask when code review will be possible by people > > from outsude Sun. > > Can you be more specific about what kind of code review actions you > mean? For instance, wearing my RTI advocate hat, I would probably > accept RTI s

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-21 Thread James Carlson
Joerg Schilling writes: > > That would mean "the strchr function takes a pointer to character > > argument, it does not modify the storage pointed to, and the value it > > returns has the same storage qualifiers as the first argument." > > If the #pragma only affects the storage attributes (as I i

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-21 Thread Joerg Schilling
James Carlson <[EMAIL PROTECTED]> wrote: > > >typeof(arg1) > > >strchr(const char *, char) > > > > > >or something similar that would carry the actual input over to the return > > >value. > > > > > > It would soon give you C++ type overloading. Might not be bad, but you > > know where to find

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-21 Thread James Carlson
[EMAIL PROTECTED] writes: > >typeof(arg1) > >strchr(const char *, char) > > > >or something similar that would carry the actual input over to the return > >value. > > > It would soon give you C++ type overloading. Might not be bad, but you > know where to find C++ :-) A good subset of the func

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-21 Thread Casper . Dik
>The question would be if the C standard commitee could define something like >this: > >typeof(arg1) >strchr(const char *, char) > >or something similar that would carry the actual input over to the return >value. It would soon give you C++ type overloading. Might not be bad, but you know whe

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-21 Thread Joerg Schilling
[EMAIL PROTECTED] wrote: > The C standards folks aren't that stupid. The function should not > have their return values const qualified because in the majority > of cases: > - the argument isn't const > - the return value is going to be modified. > > The const qualifier for the argume

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-21 Thread Casper . Dik
>Yes, there are a number of standard library and system functions which >could or should have their return types const-qualified but don't. >Historical and conformance reasons, of course, but it makes >-Wwrite-strings and similar options rather useless. The C standards folks aren't that stupid.

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-20 Thread Dan Price
On Mon 20 Mar 2006 at 03:24PM, Stephen Lau wrote: > Joerg Schilling wrote: > >> "The list of code reviewers should be individuals who have > >> actually reviewed the code, not an alias for a group of people who > >> were given the opportunity to do so." > > > > > >This reminds me of to ask wh

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-20 Thread Stephen Lau
Joerg Schilling wrote: "The list of code reviewers should be individuals who have actually reviewed the code, not an alias for a group of people who were given the opportunity to do so." This reminds me of to ask when code review will be possible by people from outsude Sun. Dan Pri

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-20 Thread Stephen Hahn
* Joerg Schilling <[EMAIL PROTECTED]> [2006-03-20 13:36]: > Keith M Wesolowski <[EMAIL PROTECTED]> wrote: > > "The list of code reviewers should be individuals who have > > actually reviewed the code, not an alias for a group of people who > > were given the opportunity to do so." > >

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-20 Thread Keith M Wesolowski
On Mon, Mar 20, 2006 at 10:36:23PM +0100, Joerg Schilling wrote: > If you really like to use const char *, then it may needed to change thousands > of lines. And even then you would not find: Yes, I understand. I wasn't suggesting to change the code but rather to examine it. In most cases, larg

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-20 Thread Joerg Schilling
Keith M Wesolowski <[EMAIL PROTECTED]> wrote: > No one said you have to manually test every possible input to every > possible program. In many cases you may be able to use semi-automated > means to rule out a need for any manual testing at all (for example, > if you can show that every reference

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-20 Thread Joerg Schilling
Keith M Wesolowski <[EMAIL PROTECTED]> wrote: > bugs of this type. I believe the printing system (cmd/lp) in > particular is actually using -fwritable-strings in a few places still, > so it would definitely break with -xstrconst. Is there no way to modify the related code to work with -xstrconst

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-18 Thread Eric Enright
On 3/18/06, Keith M Wesolowski <[EMAIL PROTECTED]> wrote: > On Sat, Mar 18, 2006 at 09:31:27PM +0100, Roland Mainz wrote: > > > Ouch... every single binary with all possible combinations of input ? > > That's almost impossible for a single person .. ;-( > > No one said you have to manually test eve

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-18 Thread Keith M Wesolowski
On Sat, Mar 18, 2006 at 09:31:27PM +0100, Roland Mainz wrote: > Ouch... every single binary with all possible combinations of input ? > That's almost impossible for a single person .. ;-( No one said you have to manually test every possible input to every possible program. In many cases you may

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-18 Thread Roland Mainz
Keith M Wesolowski wrote: > On Sat, Mar 18, 2006 at 08:35:51PM +0100, Roland Mainz wrote: > > Are there any objections that I make a patch which simply adds > > "-xstrconst" to the tree-wide compile options ? > > Not at all; I'd welcome it, provided - and this is a big catch - that > you can demon

Re: "-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-18 Thread Keith M Wesolowski
On Sat, Mar 18, 2006 at 08:35:51PM +0100, Roland Mainz wrote: > Are there any objections that I make a patch which simply adds > "-xstrconst" to the tree-wide compile options ? Not at all; I'd welcome it, provided - and this is a big catch - that you can demonstrate that you've achieved the neces

"-xstrconst" patch / was: Re: [osol-discuss] Footprint: Compiling kernel+tools with "-xstrconst -xbuiltin=%all"

2006-03-18 Thread Roland Mainz
Keith M Wesolowski wrote: > On Sat, Mar 18, 2006 at 09:29:35AM +0100, [EMAIL PROTECTED] wrote: > > > Doesn't gcc -fwritable-strings work? > > Yes, in gcc 3. However it issues a warning about deprecation, and in > gcc 4 the option is gone entirely. Are there any objections that I make a patch wh