#269 closed enhancement (fixed)
Silent warning on mixed class and struct keyword
Reported by: | mloskot | Owned by: | mloskot |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | C API | Version: | main |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
It's perfectly safe to silent these warning C4099:
1>g:\dev\geos\_svn\trunk\capi\geos_c.h(738) : warning C4099: 'geos::io::WKTReader' : type name first seen using 'class' now seen using 'struct' 1> g:\dev\geos\_svn\trunk\source\headers\geos\io\wktreader.h(59) : see declaration of 'geos::io::WKTReader' 1>g:\dev\geos\_svn\trunk\capi\geos_c.h(739) : warning C4099: 'geos::io::WKTWriter' : type name first seen using 'class' now seen using 'struct' 1> g:\dev\geos\_svn\trunk\source\headers\geos\io\wktwriter.h(74) : see declaration of 'geos::io::WKTWriter' 1>g:\dev\geos\_svn\trunk\capi\geos_c.h(740) : warning C4099: 'geos::io::WKBReader' : type name first seen using 'class' now seen using 'struct' 1> g:\dev\geos\_svn\trunk\source\headers\geos\io\wkbreader.h(73) : see declaration of 'geos::io::WKBReader' 1>g:\dev\geos\_svn\trunk\capi\geos_c.h(741) : warning C4099: 'geos::io::WKBWriter' : type name first seen using 'class' now seen using 'struct' 1> g:\dev\geos\_svn\trunk\source\headers\geos\io\wkbwriter.h(73) : see declaration of 'geos::io::WKBWriter'
by putting the following pragma on top of translation units of C API:
#ifdef _MSC_VER #pragma warning(disable : 4099) #endif
For C++, there is no difference (in that case reported above) between struct and class keywords - C++ standard uses these keywords interchangeable.
Change History (5)
comment:1 by , 15 years ago
Milestone: | → 3.1.1 |
---|---|
Owner: | changed from | to
comment:2 by , 15 years ago
Milestone: | 3.1.1 → 3.1.2 |
---|
comment:3 by , 14 years ago
Status: | new → assigned |
---|
Note:
See TracTickets
for help on using tickets.
Go for it, I have full trust! Please apply to 3.1 branch if appropriate and trunk.