View Issue Details

IDProjectCategoryView StatusLast Update
0002280OpenFOAMBugpublic2016-10-04 08:35
Reporteruser696Assigned Tohenry  
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
PlatformlinuxOSopensuseOS Version11.4
Product Versiondev 
Fixed in Versiondev 
Summary0002280: __STDC_LIMITS_MACROS re-defined in several places
DescriptionEach of direction.H, int32.H, int64.H, uint32.H, uint64.H contains a #define __STDC_LIMIT_MACROS.

Can provoke noisy compiler warning about redefinition.
Should mirror the normal practice as per /usr/include/unicode/ptypes.h

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
TagsNo tags attached.

Activities

henry

2016-10-03 16:37

manager   ~0006952

> Can provoke noisy compiler warning about redefinition.

I have not seen any of these messages, which versions of which compiler generate these warnings?

wyldckat

2016-10-03 17:53

updater   ~0006953

The definition of "__STDC_LIMIT_MACROS" was introduced as a fix for this report: http://bugs.openfoam.org/view.php?id=1474

We discussed a few possible solutions and in the following comment is Henry's comment on what can be done once C++11 is the standard being used in OpenFOAM: http://bugs.openfoam.org/view.php?id=1474#c3506

I guess the time is right to replace the "__STDC_LIMIT_MACROS" hack with cstdint and numeric_limits. More details are available on the comments for that bug report.

henry

2016-10-03 18:21

manager   ~0006954

@Bruno: I will check that the current C++11 compilers we support are OK with this change.

henry

2016-10-04 08:35

manager   ~0006957

#define __STDC_LIMIT_MACROS removed from OpenFOAM-dev:

commit dee026476892e0870b59fbc0cbe8de2fa46d0508

Issue History

Date Modified Username Field Change
2016-10-03 16:16 user696 New Issue
2016-10-03 16:37 henry Note Added: 0006952
2016-10-03 17:53 wyldckat Note Added: 0006953
2016-10-03 18:21 henry Note Added: 0006954
2016-10-04 08:35 henry Note Added: 0006957
2016-10-04 08:35 henry Assigned To => henry
2016-10-04 08:35 henry Status new => resolved
2016-10-04 08:35 henry Resolution open => fixed
2016-10-04 08:35 henry Fixed in Version => dev