[ros-users] Illegal instruction
Ivan Dryanovski
ivan.dryanovski at gmail.com
Fri Jun 18 16:16:43 UTC 2010
This produces a warning during compilation: "warning: cannot pass
objects of non-POD type ‘struct std::string’ through ‘...’; call will
abort at runtime". However, the warning itself was a little confusing
for me, and there's always a chance of compiling with warnings turned
off.
Ivan
On Fri, Jun 18, 2010 at 12:07 PM, Bill Morris <morris at ee.ccny.cuny.edu> wrote:
> std::string foo;
>
> ...
>
> ROS_INFO("Foo: %s",foo);
> $ bin/my_node
> Illegal instruction
>
> This throws an illegal instruction during execution.
>
> ROS_INFO("Foo: %s",foo.c_str());
> Obviously works correctly.
>
> Is it possible to get this to produce a better error message?
>
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
More information about the ros-users
mailing list