This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] for SIGSEGV, compilation error in gcc 4.6


On Thu, Feb 10, 2011 at 03:15:15PM +0100, Corinna Vinschen wrote:
>On Feb 10 21:47, jojelino wrote:
>> On 2011-02-10 19:02, Corinna Vinschen wrote:
>> 
>> >Also, it would be nice if you would add more words to explain what your
>> >patch is doing.  Just a patch with no explanation is not very inviting
>> >to take a look at it at all.
>> 
>> this patch deals with only "two" problem. and this is "first" one.
>> 
>> static char * (*findenv_func)(const char *, int *) = (char *
>> (*)(const char *, int *)) getearly;
>> findenv_func is declared without __stdcall convention, and it is
>> casting getearly having __stdcall convention with function type
>> without __stdcall convention. to fix this problem, add __stdcall to
>> findenv_func.
>> 
>> and this is "another" one.
>> 
>> this one deals with compilation error that gcc 4.6 complained. so i
>> just copy & paste __attribute__((regparm (x))) from function
>> declaration to function definition, so i must admit that this one
>> was derived from original cygwin source code. that is, you can fix
>> it without this patch.
>
>Ok, I have just a problem.  Your patch doesn't apply because your
>mail client appears to insert line breaks if the lines get too long.
>Please send the patch again without the line breaks.  Maybe you could
>just attach it to your mail rather than inlining it.

Please don't just apply it.  Some of the changes suffered from a cut/paste
mentality, where the right solution was not always to just add a __stdcall.

The patch needs to actually be studied and probably applied piecemeal.

I'm also not sure why gcc changed its behavior in this way for 4.6.  I
wonder if it is intended.  Dave, can you confirm or deny?

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]