Skip to content
Snippets Groups Projects
  • Tom Tromey's avatar
    bc0e18a9
    Fix PR libcc1/113977 · bc0e18a9
    Tom Tromey authored
    PR libcc1/113977 points out a case where a simple expression is
    rejected with a compiler error message.  The bug here is that gdb does
    not inform the plugin of the correct alignment -- in fact, there is no
    way to do that.
    
    This patch adds a new method to allow the alignment to be set, and
    bumps the C front end protocol version.
    
    It also includes some updates to various comments in 'include', done
    here to simplify the merge to binutils-gdb.
    
    include
    
    	* gcc-cp-interface.h (gcc_cp_fe_context_function): Update
    	comment.
    	* gcc-c-interface.h (enum gcc_c_api_version) <GCC_C_FE_VERSION_2>:
    	New constant.
    	(gcc_c_fe_context_function): Update comment.
    	* gcc-c-fe.def (finish_record_with_alignment): New method.
    	Update documentation.
    
    libcc1
    
    	PR libcc1/113977
    	* libcc1plugin.cc (plugin_finish_record_or_union): New function.
    	(plugin_finish_record_or_union): Rewrite.
    	(plugin_init): Use GCC_C_FE_VERSION_2.
    	* libcc1.cc (c_vtable): Use GCC_C_FE_VERSION_2.
    	(gcc_c_fe_context): Check for GCC_C_FE_VERSION_2.
    
    
    bc0e18a9
    History
    Fix PR libcc1/113977
    Tom Tromey authored
    PR libcc1/113977 points out a case where a simple expression is
    rejected with a compiler error message.  The bug here is that gdb does
    not inform the plugin of the correct alignment -- in fact, there is no
    way to do that.
    
    This patch adds a new method to allow the alignment to be set, and
    bumps the C front end protocol version.
    
    It also includes some updates to various comments in 'include', done
    here to simplify the merge to binutils-gdb.
    
    include
    
    	* gcc-cp-interface.h (gcc_cp_fe_context_function): Update
    	comment.
    	* gcc-c-interface.h (enum gcc_c_api_version) <GCC_C_FE_VERSION_2>:
    	New constant.
    	(gcc_c_fe_context_function): Update comment.
    	* gcc-c-fe.def (finish_record_with_alignment): New method.
    	Update documentation.
    
    libcc1
    
    	PR libcc1/113977
    	* libcc1plugin.cc (plugin_finish_record_or_union): New function.
    	(plugin_finish_record_or_union): Rewrite.
    	(plugin_init): Use GCC_C_FE_VERSION_2.
    	* libcc1.cc (c_vtable): Use GCC_C_FE_VERSION_2.
    	(gcc_c_fe_context): Check for GCC_C_FE_VERSION_2.