View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004023 | libmicrohttpd | external API | public | 2015-10-24 23:26 | 2015-10-31 16:06 |
| Reporter | matwey | Assigned To | Karlson2k | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.9.44 | ||||
| Target Version | 0.9.45 | Fixed in Version | 0.9.45 | ||
| Summary | 0004023: MHD_create_response_from_fd_at_offset: error: expected expression before ‘#pragma’ | ||||
| Description | Hello, When compiled with gcc 4.4.1 the following code struct MHD_Response *response; response = MHD_create_response_from_fd_at_offset(rsize, fd, offset); leads to the following compilation error error: expected expression before ‘#pragma’ Preprocessed source is the following: response = #pragma message "Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()" MHD_create_response_from_fd_at_offset64((rsize),(fd),(offset)); | ||||
| Tags | No tags attached. | ||||
|
|
Ok, that's very strange that the cpp doesn't expand #pragma. The obvious workaround is to not use the deprecated API, or to #define MHD_NO_DEPRECATION before #including "microhttpd.h" or to upgrade to GCC 4.8 or higher. Alternatively, maybe Karlson2K can find out why his deprecation macro-mania doesn't work as expected? I must admit I'm simply puzzled. His check is for GCC >= 4.8, so 4.4.1 is classified as "older" GCC here. |
|
|
Checked it with GCC 4.4.0 - error reproduced. Will fix it. As another possible workaround: replace usage of deprecated functions. |
|
|
Should be fixed in SVN 36593 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-10-24 23:26 | matwey | New Issue | |
| 2015-10-25 16:25 | Christian Grothoff | Note Added: 0009786 | |
| 2015-10-26 22:13 | Karlson2k | Note Added: 0009800 | |
| 2015-10-27 00:39 | Christian Grothoff | Assigned To | => Karlson2k |
| 2015-10-27 00:39 | Christian Grothoff | Status | new => assigned |
| 2015-10-27 00:39 | Christian Grothoff | Target Version | => 0.9.45 |
| 2015-10-27 13:26 | Karlson2k | Note Added: 0009803 | |
| 2015-10-27 13:26 | Karlson2k | Resolution | open => fixed |
| 2015-10-27 13:34 | Christian Grothoff | Status | assigned => resolved |
| 2015-10-27 13:34 | Christian Grothoff | Fixed in Version | => 0.9.45 |
| 2015-10-31 16:06 | Christian Grothoff | Status | resolved => closed |
| 2024-01-21 13:24 | Christian Grothoff | Category | libmicrohttpd API => external API |