Kindly explain these warnings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Naren

    Kindly explain these warnings

    Hello All,
    I dont get errors but I get warnings though the code runs fine.
    Could anyone help me removing these warnings

    c:\program files\microsoft visual studio\vc98\inc lude\vector(48) : warning
    C4786:
    '??0?$vector@V? $basic_string@D U?$char_traits@ D@std@@V?$alloc ator@D@2@@std@@ V
    ?$allocator@V?$ basic_string@DU ?$char_traits@D @std@@V?$alloca tor@D@2@@std@@@ 2
    @@std@@QAE@IABV
    ?$basic_string@ DU?$char_traits @D@std@@V?$allo cator@D@2@@1@AB V?$allocator@V? $
    basic_string@DU ?$char_traits@D @std@@V?$alloca tor@D@2@@std@@@ 1@@Z' :
    identifier was truncated to '255' characters in the browser information
    z:\hexmod17\src \cvariantinfo.h (15) : see reference to class template
    instantiation 'std::vector<cl ass std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> >,class
    std::allocator< class std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> > > >' being compiled
    c:\program files\microsoft visual studio\vc98\inc lude\vector(61) : warning
    C4786:
    '??0?$vector@V? $basic_string@D U?$char_traits@ D@std@@V?$alloc ator@D@2@@std@@ V
    ?$allocator@V?$ basic_string@DU ?$char_traits@D @std@@V?$alloca tor@D@2@@std@@@ 2
    @@std@@QAE@PBV?
    $basic_string@D U?$char_traits@ D@std@@V?$alloc ator@D@2@@1@0AB V?$allocator@V? $
    basic_string@DU ?$char_traits@D @std@@V?$alloca tor@D@2@@std@@@ 1@@Z' :
    identifier was truncated to '255' characters in the browser information
    z:\hexmod17\src \cvariantinfo.h (15) : see reference to class template
    instantiation 'std::vector<cl ass std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> >,class
    std::allocator< class std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> > > >' being compiled
    c:\program files\microsoft visual studio\vc98\inc lude\vector(103 ) : warning
    C4786:
    '?rbegin@?$vect or@V?$basic_str ing@DU?$char_tr aits@D@std@@V?$ allocator@D@2@@ s
    td@@V?$allocato r@V?$basic_stri ng@DU?$char_tra its@D@std@@V?$a llocator@D@2@@s t
    d@@@2@@std@@QA
    E?AV?$reverse_i terator@PAV?$ba sic_string@DU?$ char_traits@D@s td@@V?$allocato r
    @D@2@@std@@V12@ AAV12@PAV12@H@2 @XZ' : identifier was truncated to '255'
    characters in the browser information
    z:\hexmod17\src \cvariantinfo.h (15) : see reference to class template
    instantiation 'std::vector<cl ass std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> >,class
    std::allocator< class std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> > > >' being compiled
    c:\program files\microsoft visual studio\vc98\inc lude\vector(105 ) : warning
    C4786:
    '?rbegin@?$vect or@V?$basic_str ing@DU?$char_tr aits@D@std@@V?$ allocator@D@2@@ s
    td@@V?$allocato r@V?$basic_stri ng@DU?$char_tra its@D@std@@V?$a llocator@D@2@@s t
    d@@@2@@std@@QB
    E?AV?$reverse_i terator@PBV?$ba sic_string@DU?$ char_traits@D@s td@@V?$allocato r
    @D@2@@std@@V12@ ABV12@PBV12@H@2 @XZ' : identifier was truncated to '255'
    characters in the browser information
    z:\hexmod17\src \cvariantinfo.h (15) : see reference to class template
    instantiation 'std::vector<cl ass std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> >,class
    std::allocator< class std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> > > >' being compiled
    c:\program files\microsoft visual studio\vc98\inc lude\vector(107 ) : warning
    C4786:
    '?rend@?$vector @V?$basic_strin g@DU?$char_trai ts@D@std@@V?$al locator@D@2@@st d
    @@V?$allocator@ V?$basic_string @DU?$char_trait s@D@std@@V?$all ocator@D@2@@std @
    @@2@@std@@QAE?
    AV?$reverse_ite rator@PAV?$basi c_string@DU?$ch ar_traits@D@std @@V?$allocator@ D
    @2@@std@@V12@AA V12@PAV12@H@2@X Z' : identifier was truncated to '255'
    characters in the browser information
    z:\hexmod17\src \cvariantinfo.h (15) : see reference to class template
    instantiation 'std::vector<cl ass std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> >,class
    std::allocator< class std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> > > >' being compiled
    c:\program files\microsoft visual studio\vc98\inc lude\vector(108 ) : warning
    C4786:
    '?rend@?$vector @V?$basic_strin g@DU?$char_trai ts@D@std@@V?$al locator@D@2@@st d
    @@V?$allocator@ V?$basic_string @DU?$char_trait s@D@std@@V?$all ocator@D@2@@std @
    @@2@@std@@QBE?
    AV?$reverse_ite rator@PBV?$basi c_string@DU?$ch ar_traits@D@std @@V?$allocator@ D
    @2@@std@@V12@AB V12@PBV12@H@2@X Z' : identifier was truncated to '255'
    characters in the browser information
    z:\hexmod17\src \cvariantinfo.h (15) : see reference to class template
    instantiation 'std::vector<cl ass std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> >,class
    std::allocator< class std::basic_stri ng<char,struct
    std::char_trait s<char>,class std::allocator< char> > > >' being compiled
    c:\program files\microsoft visual studio\vc98\inc lude\vector(114 ) : warning
    C4786:
    'std::reverse_i terator<std::ba sic_string<char ,std::char_trai ts<char>,std::a l
    locator<char> > const
    *,std::basic_st ring<char,std:: char_traits<cha r>,std::allocat or<char>[color=blue]
    >,std::basic_st ring<char,std:: char_traits<cha r>,std::allocat or<char> >[/color]
    const &,std::basic_st ring<char,std:: char_traits<cha r>,std::allocat or<char> >
    const *,int>' : identifier was truncated to '255' characters in the debug
    information
    c:\program files\microsoft visual studio\vc98\inc lude\vector(114 ) :
    while compiling class-template member function 'unsigned int __thiscall
    std::vector<std ::basic_string< char,std::char_ traits<char>,st d::allocator<ch a
    r> >,std::allocato r<std::
    basic_string<ch ar,std::char_tr aits<char>,std: :allocator<char > > >[color=blue]
    >::size(void) const'[/color]
    c:\program files\microsoft visual studio\vc98\inc lude\vector(114 ) : warning
    C4786:
    'std::reverse_i terator<std::ba sic_string<char ,std::char_trai ts<char>,std::a l
    locator<char> >
    *,std::basic_st ring<char,std:: char_traits<cha r>,std::allocat or<char> >,std
    ::basic_string< char,std::char_ traits<char>,st d::allocator<ch ar> >
    &,std::basic_st ring<char,std:: char_traits<cha r>,std::allocat or<char> >
    *,int>' : identifier was truncated to '255' characters in the debug
    information
    c:\program files\microsoft visual studio\vc98\inc lude\vector(114 ) :
    while compiling class-template member function 'unsigned int __thiscall
    std::vector<std ::basic_string< char,std::char_ traits<char>,st d::allocator<ch a
    r> >,std::allocato r<std::
    basic_string<ch ar,std::char_tr aits<char>,std: :allocator<char > > >[color=blue]
    >::size(void) const'[/color]


    CVctrInfoBlk.ob j - 0 error(s), 8 warning(s)

    I have compiled in MS VC 6.0 compiler.

    Here is header file cvariantinfo.h and the warning occurs exactly at the
    line where is declare a static vector<string>

    #ifndef CVARIANTINFO_H
    #define CVARIANTINFO_H

    #include <vector>
    #include <string>

    class CVariantInfo
    {
    public:
    static vector<uint32> m_VDSVctrEntrie s;
    static vector<uint32> m_VDSBlkLength;
    static vector<uint32> m_VDSIndex;
    static vector<string> m_VDSFileName; //warning occurs here
    static uint32 m_ulBlkLength;
    };

    #endif

    Thanks in advance.

    Regards,
    Naren.



  • David Fisher

    #2
    Re: Kindly explain these warnings

    "Naren" <narendranath.t s@in.bosch.com> wrote:
    [color=blue]
    > Could anyone help me removing these warnings[/color]
    [color=blue]
    > c:\program files\microsoft visual studio\vc98\inc lude\vector(48) : warning
    > C4786:[/color]
    [...snip...][color=blue]
    > identifier was truncated to '255' characters in the browser information[/color]

    Template expansions produce some very long names - not a real problem
    though. You can get rid of the warning with:

    #pragma warning(disable :4786)

    BTW with Visual C++ you can click on an error message and press F1 to get
    more information about it ...

    David F


    Comment

    • Chris Theis

      #3
      Re: Kindly explain these warnings


      "Naren" <narendranath.t s@in.bosch.com> wrote in message
      news:bu7r3b$3s9 $1@ns2.fe.inter net.bosch.com.. .[color=blue]
      > Hello All,
      > I dont get errors but I get warnings though the code runs fine.
      > Could anyone help me removing these warnings
      >
      > c:\program files\microsoft visual studio\vc98\inc lude\vector(48) : warning
      > C4786:[/color]
      [SNIP][color=blue]
      >
      > Thanks in advance.
      >
      > Regards,
      > Naren.[/color]

      There is nothing you need to worry about. This is just an VC++ feature in
      the debug version, telling you that the internal symbols reached the limit
      of 255 characters and thus are truncated for the browse-information
      database. To turn this annoying stuff off you will have to resort to a
      #pragma statement. I don't know the exact syntax by heart but it should be
      something like

      #pragma warning off (C4786)

      Please, check your manual for the correct syntax!!

      Regards
      Chris


      Comment

      Working...