https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122009

Filip Kastl <pheeck at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pheeck at gcc dot gnu.org

--- Comment #7 from Filip Kastl <pheeck at gcc dot gnu.org> ---
(In reply to GCC Commits from comment #4)
>             * gm2-gcc/m2type.cc (m2type_BuildEnumerator): Remove const.

Btw, removing const here means that you are now passing a const char * as a
non-const char * parameter here:

tree
m2type_GetBooleanEnumList (location_t location)
{
  tree list = NULL;       
  m2type_BuildEnumerator (location, "TRUE", m2type_GetBooleanTrue (), &list);
  m2type_BuildEnumerator (location, "FALSE", m2type_GetBooleanTrue (), &list);

That would be nice not to do, if it can be helped.  m2type_BuildEnumerator()
currently doesn't modify 'name'.  But if it does in the future, that will be
UB, I believe.

Reply via email to