This warning is apparently not causing a problem but I like to
understand the warnings so I can look for potential problems. Not
quite sure why this one occurs.

Thanks,

jh

c:\program files\microsoft visual studio\vc98\include\utility(21) :
warning C4786: 'std::pair<std::deque<unsigned
char,std::allocator<unsigned char>
>::const_iterator,std::deque<unsigned char,std::allocator<unsigned
char> >::const_iterator>::pair<st
d::deque<unsigned char,std::allocator<unsigned char>
>::const_iterator,std::deque<unsigned char,std::allocator<unsigned
char> >::const_iterator>' : identifier was truncated to '255'
characters in the debug information

#include "dvGPS.h"

int getSentence(const char cStart, const char cStop, char* sentence)
{
char c;
deque<char> charDeque(0);

while((c = getByte()) != cStart)
{
//Do nothing but toss it.
cout << c << endl;
}

cout << "//Collect characters." << endl;
do
{
charDeque.push_back(c);
cout << c << endl;
cout << hex << (unsigned short)c << endl;
}while((c = getByte()) != cStop);

charDeque.push_back(c);
charDeque.push_back('\0');
copy(charDeque.begin(), charDeque.end(), sentence);
return charDeque.size() -1;
}

Re: Compiler warning by Victor

Victor
Tue Feb 27 08:58:21 CST 2007

HMS Surprise wrote:
> This warning is apparently not causing a problem but I like to
> understand the warnings so I can look for potential problems. Not
> quite sure why this one occurs.

Put the blinking cursor on the warning number and press F1. That
should give you enough information to understand the warning. If
you have questions after that, ask again.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask



Re: Compiler warning by David

David
Tue Feb 27 09:02:25 CST 2007

HMS Surprise wrote:

> This warning is apparently not causing a problem but I like to
> understand the warnings so I can look for potential problems. Not
> quite sure why this one occurs.
>
> Thanks,
>
> jh
>
> c:\program files\microsoft visual studio\vc98\include\utility(21) :
> warning C4786: 'std::pair<std::deque<unsigned
> char,std::allocator<unsigned char>
>
>>::const_iterator,std::deque<unsigned char,std::allocator<unsigned
>
> char> >::const_iterator>::pair<st
> d::deque<unsigned char,std::allocator<unsigned char>
>
>>::const_iterator,std::deque<unsigned char,std::allocator<unsigned
>
> char> >::const_iterator>' : identifier was truncated to '255'
> characters in the debug information
>
> #include "dvGPS.h"
>
> int getSentence(const char cStart, const char cStop, char* sentence)
> {
> char c;
> deque<char> charDeque(0);
>
> while((c = getByte()) != cStart)
> {
> //Do nothing but toss it.
> cout << c << endl;
> }
>
> cout << "//Collect characters." << endl;
> do
> {
> charDeque.push_back(c);
> cout << c << endl;
> cout << hex << (unsigned short)c << endl;
> }while((c = getByte()) != cStop);
>
> charDeque.push_back(c);
> charDeque.push_back('\0');
> copy(charDeque.begin(), charDeque.end(), sentence);
> return charDeque.size() -1;
> }
>

HMS:

Thsi one there is nothing to do about and you might was well turn it off:

#pragma warning (disable : 4786)

It happens because the templated standard library clesses, when
expanded, generate very long names. It does not affect the code, just
the display in the debugger.

David Wilkinson

Re: Compiler warning by HMS

HMS
Tue Feb 27 18:52:37 CST 2007

On Feb 27, 9:02 am, David Wilkinson <no-re...@effisols.com> wrote:
> HMS Surprise wrote:
> > This warning is apparently not causing a problem but I like to
> > understand the warnings so I can look for potential problems. Not
> > quite sure why this one occurs.
>
> > Thanks,
>
> > jh
>
> > c:\program files\microsoft visual studio\vc98\include\utility(21) :
> > warning C4786: 'std::pair<std::deque<unsigned
> > char,std::allocator<unsigned char>
>
> >>::const_iterator,std::deque<unsigned char,std::allocator<unsigned
>
> > char> >::const_iterator>::pair<st
> > d::deque<unsigned char,std::allocator<unsigned char>
>
> >>::const_iterator,std::deque<unsigned char,std::allocator<unsigned
>
> > char> >::const_iterator>' : identifier was truncated to '255'
> > characters in the debug information
>
> > #include "dvGPS.h"
>
> > int getSentence(const char cStart, const char cStop, char* sentence)
> > {
> > char c;
> > deque<char> charDeque(0);
>
> > while((c = getByte()) != cStart)
> > {
> > //Do nothing but toss it.
> > cout << c << endl;
> > }
>
> > cout << "//Collect characters." << endl;
> > do
> > {
> > charDeque.push_back(c);
> > cout << c << endl;
> > cout << hex << (unsigned short)c << endl;
> > }while((c = getByte()) != cStop);
>
> > charDeque.push_back(c);
> > charDeque.push_back('\0');
> > copy(charDeque.begin(), charDeque.end(), sentence);
> > return charDeque.size() -1;
> > }
>
> HMS:
>
> Thsi one there is nothing to do about and you might was well turn it off:
>
> #pragma warning (disable : 4786)
>
> It happens because the templated standard library clesses, when
> expanded, generate very long names. It does not affect the code, just
> the display in the debugger.
>
> David Wilkinson

Thank you both. Didn't know about the F1 trick.

jh