[PATCH v2] rtems-utils: Change data type definition

Chris Johns chrisj at rtems.org
Tue Aug 10 01:54:15 UTC 2021


On 9/8/21 10:48 pm, Ryan Long wrote:
> Without the global namespace prefix, it results in the following error
> 
> ../linkers/rtems-exeinfo.cpp: In member function ‘void rld::exeinfo::image::output_compilation_unit(bool, bool)’:
> ../linkers/rtems-exeinfo.cpp:370:14: error: ‘rld::rtems::utils’ has not been declared
>        rtems::utils::ostream_guard old_state( std::cout );
>               ^
> ../linkers/rtems-exeinfo.cpp:370:35: error: expected ‘;’ before ‘old_state’
>        rtems::utils::ostream_guard old_state( std::cout );
> 
> Alex and I determined that the compiler is thinking that ostream_guard is defined in the rld::rtems namespace. This was the only way we figured out how to get it to compile without the typedef at the top of the file.

Ah OK. This makes sense and I think it is better to have the global prefix there
so the full path is known.

Chris


More information about the devel mailing list