[Top][All Lists]

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

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

From: Michael Lee (@michael2e2)
Subject: wget2 | Support linkage from C++ modules (!511)
Date: Wed, 10 Aug 2022 15:18:20 +0000

Michael Lee created a merge request: 

Project:Branches: ml2e2/wget2:fix-cpp-linkage to gnuwget/wget2:master
Author:   Michael Lee

Fix issue: https://gitlab.com/gnuwget/wget2/-/issues/612

While 'restrict' is a reserved keyword in C99 (described in C99-6.4.1-1), it is 
not true in any standard of C++ (from C++11 to C++20). Since we cannot compile 
C++ modules with '-std=gnu99' option, we shall use GCC extension (i.e., 
'\_\_restrict' or '\_\_restrict\_\_') to gain the similar or equivalent 
optimization benefits provided by compiler. 

This is the same workaround adopted by GLIBC: 

### Approver's checklist:

* [ ] The author has submitted the FSF Copyright Assignment and is listed in 
* [ ] There is a test suite reasonably covering new functionality or 
* [ ] Function naming, parameters, return values, types, etc., are consistent 
with existing code
* [ ] This feature/change has adequate documentation added (if appropriate)
* [ ] No obvious mistakes / misspelling in the code

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]