This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C,C++] integer constants in attribute arguments


On Sun, 2 Feb 2014, Marc Glisse wrote:

> An alternative could be to have a helper function that does nothing in C and
> calls default_conversion in C++. Or make the C version of default_conversion
> return its argument unchanged instead of asserting when it sees an unexpected
> tree.

Well, in principle I'm dubious about the cases where different 
implementations of functions with the same name are used in c-family code; 
I'd prefer an actual C/C++ set of langhooks, with clearly defined 
semantics based on what the c-family users need, where the hook used 
(c_family_lang_hooks.convert_attribute_argument or whatever) would indeed 
do nothing for C.  But more than just default_conversion is involved 
there, and default_conversion is already used from c-family code, so this 
isn't an objection to this patch.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]