In the following code:

for(int i = 0; i < argc; i++)
    cout << (i > 0 ? "  " : "") << argv << (i < argc - 1 ? " \\" : "")
         << endl;

I try to use "next" to step over, but always step into some other source file as I get the information:

517 __ostream_insert(__out, __s,
444 { return __check_facet(_M_ctype).widen(__c); }
53 if (!__f)
873 if (_M_widen_ok)
1169 __tmp[__i] = __i;
1168 for (size_t __i = 0; __i < sizeof(_M_widen); ++__i)
1169 __tmp[__i] = __i;
1168 for (size_t __i = 0; __i < sizeof(_M_widen); ++__i)
1169 __tmp[__i] = __i;

If I try to step out, I get:

(gdb) finish
"finish" not meaningful in the outermost frame.

Thanks for your help!

What does "inlined code" mean?
The snippet of code is in main function and does not have anything specified as "inline".

But you have included things like iostream for example.

> __ostream_insert
This is what implements "cout <<"
so yeah, my guess is still that the code for cout has been inlined.

How did you compile it?

The Makefile is something like:

LDFLAGS=-static -lm -ljpeg -lpng -lz
absurdity: xxx.o
	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
Makefile.depend: *.h *.cc Makefile
	$(CC) -M *.cc > Makefile.depend
include Makefile.depend

How to tell cout is inlined?

Please comment if you have some. Any help is appreciated.

This article has been dead for over six months. Start a new discussion instead.