Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. xlocale & xlocnum produce warnings at level 4

xlocale & xlocnum produce warnings at level 4

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++iosvisual-studiotutorial
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scott sanders
    wrote on last edited by
    #1

    Hello, When I build my MFC project at warning level 4 using VS6sp5, the compiler generates a ton of warning messages from the locale files xlocale and xlocnum. Is this a normal occurance ? I don't want to see these warnings every time I do a rebuild, so how can build my own project files at warning level 4 but outside includes at level 3 ? Or is there a better solution ? An example of the compiler messages I receive is shown below. Thank You srs c:\program files\microsoft visual studio\vc98\include\xlocnum(599) : warning C4018: '<' : signed/unsigned mismatch c:\program files\microsoft visual studio\vc98\include\xlocnum(588) : while compiling class-template member function 'class std::ostreambuf_iterator > __cdecl std::num_put > >::_Iput(class std::ostreambuf_iterator >,class std::ios_base &,unsigned short,char *,unsigned int)' c:\program files\microsoft visual studio\vc98\include\xlocnum(606) : warning C4018: '<=' : signed/unsigned mismatch c:\program files\microsoft visual studio\vc98\include\xlocnum(588) : while compiling class-template member function 'class std::ostreambuf_iterator > __cdecl std::num_put > >::_Iput(class std::ostreambuf_iterator >,class std::ios_base &,unsigned short,char *,unsigned int)' c:\program files\microsoft visual studio\vc98\include\xlocale(204) : warning C4244: '=' : conversion from 'unsigned int' to 'char', possible loss of data c:\program files\microsoft visual studio\vc98\include\xlocnum(151) : see reference to function template instantiation 'int __cdecl std::_Getloctxt(class std::istreambuf_iterator > &,class std::istreambuf_it erator > &,unsigned int,const char *)' being compiled c:\program files\microsoft visual studio\vc98\include\xlocale(207) : warning C4244: '=' : conversion from 'unsigned int' to 'char', possible loss of data c:\program files\microsoft visual studio\vc98\include\xlocnum(151) : see reference to function template instantiation 'int __cdecl std::_Getloctxt(class std::istreambuf_iterator > &,clas

    S 1 Reply Last reply
    0
    • S scott sanders

      Hello, When I build my MFC project at warning level 4 using VS6sp5, the compiler generates a ton of warning messages from the locale files xlocale and xlocnum. Is this a normal occurance ? I don't want to see these warnings every time I do a rebuild, so how can build my own project files at warning level 4 but outside includes at level 3 ? Or is there a better solution ? An example of the compiler messages I receive is shown below. Thank You srs c:\program files\microsoft visual studio\vc98\include\xlocnum(599) : warning C4018: '<' : signed/unsigned mismatch c:\program files\microsoft visual studio\vc98\include\xlocnum(588) : while compiling class-template member function 'class std::ostreambuf_iterator > __cdecl std::num_put > >::_Iput(class std::ostreambuf_iterator >,class std::ios_base &,unsigned short,char *,unsigned int)' c:\program files\microsoft visual studio\vc98\include\xlocnum(606) : warning C4018: '<=' : signed/unsigned mismatch c:\program files\microsoft visual studio\vc98\include\xlocnum(588) : while compiling class-template member function 'class std::ostreambuf_iterator > __cdecl std::num_put > >::_Iput(class std::ostreambuf_iterator >,class std::ios_base &,unsigned short,char *,unsigned int)' c:\program files\microsoft visual studio\vc98\include\xlocale(204) : warning C4244: '=' : conversion from 'unsigned int' to 'char', possible loss of data c:\program files\microsoft visual studio\vc98\include\xlocnum(151) : see reference to function template instantiation 'int __cdecl std::_Getloctxt(class std::istreambuf_iterator > &,class std::istreambuf_it erator > &,unsigned int,const char *)' being compiled c:\program files\microsoft visual studio\vc98\include\xlocale(207) : warning C4244: '=' : conversion from 'unsigned int' to 'char', possible loss of data c:\program files\microsoft visual studio\vc98\include\xlocnum(151) : see reference to function template instantiation 'int __cdecl std::_Getloctxt(class std::istreambuf_iterator > &,clas

      S Offline
      S Offline
      scott sanders
      wrote on last edited by
      #2

      Fixed. My solution to this problem was to change the global warning level before including the headers that used the locale files, like so : #pragma warning(push, 3) #if !defined(_BITSET_) # include #endif // !defined(_BITSET_) #pragma warning(pop)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups