tech-toolchain archive

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

Re: [PATCH 1/3] gcc: Add missing parentheses around ternary operator



Hi Martin,

Upstream gcc seems to have a different set of open flags,
for many, many years.

https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libcpp/files.c;h=c93a03c69ef5b5a5d58feb7615e955e199c7f128;hb=dc033e0149fd7790b89f816041e87a6ddc22e21c#l211

I traced back the git blame to try to find where it used
to be opened in non-blocking mode, but could not seem to
find it even back to 1999.
So I'm kind of wondering how this line came to be in NetBSD.

Cheers,
Damien

On 29/8/21 4:52 pm, Martin Husemann wrote:
> On Sun, Aug 29, 2021 at 01:42:22PM +1000, Damien Zammit wrote:
>> --- a/external/gpl3/gcc/dist/libcpp/files.c
>> +++ b/external/gpl3/gcc/dist/libcpp/files.c
>> @@ -233,7 +233,7 @@ open_file (_cpp_file *file)
>>      }
>>    else
>>      file->fd = open (file->path, O_RDONLY | O_NOCTTY | O_BINARY
>> -		     | (cpp_restricted != NULL) ? O_NONBLOCK : 0, 0666);
>> +		     | ((cpp_restricted != NULL) ? O_NONBLOCK : 0), 0666);
> 
> This is something we would prfer to go via upstream gcc, has it been
> reported there? If we bring in a temporary local fix, we usually note
> a reference to the upstrem commit or bug report.
> 
> Martin
> 


Home | Main Index | Thread Index | Old Index