[Top][All Lists]

[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: 

@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 

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: 
You're receiving this email because of your account on gitlab.com.

reply via email to

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