wget-dev
[Top][All Lists]
Advanced

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

Re: wget2 | Support linkage from C++ modules (!511)


From: Michael Lee (@michael2e2)
Subject: Re: wget2 | Support linkage from C++ modules (!511)
Date: Sun, 14 Aug 2022 04:25:09 +0000



Michael Lee commented on a discussion: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/511#note_1061713618

@rockdaboot Thanks for the review! 

I think the possible reason for this workaround (that is, directly replacing 
'restrict' with '__restrict', instead of defining a macro for 'restrict') is 
that, the 'restrict' is a reserved keyword in C, and the standard says that the 
reserved keyword should not be used in otherwise cases (C99-6.4.1-2). And since 
#define marcro is used to define an 'identifier' for the latter use, the form 
of '#define restrict XXX' will be treating 'restrict' as an identifier, which 
violates the rule 'should not be used in otherwise cases' (specified in 
C99-6.4.1-2).

Therefore, it might be more rational to use '__restrict' directly in C code 
when the project wants to be used in C++ environment as well.

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/511#note_1061713618
You're receiving this email because of your account on gitlab.com.




reply via email to

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