You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got this error when trying to use gccutils.pformat when compiling C code:
{{{
File "/home/tromey/Space/Trunk/gcc-python-plugin/cvtlisp.py", line 204, in map_tree
print gccutils.pformat(tree)
File "/home/tromey/Space/Trunk/gcc-python-plugin/gccutils.py", line 123, in pformat
return pp.pformat(obj)
File "/home/tromey/Space/Trunk/gcc-python-plugin/gccutils.py", line 176, in pformat
return self._recursive_format_obj(obj, set(), 0)
File "/home/tromey/Space/Trunk/gcc-python-plugin/gccutils.py", line 208, in _recursive_format_obj
visited, depth + 1)
File "/home/tromey/Space/Trunk/gcc-python-plugin/gccutils.py", line 199, in _recursive_format_obj
for name, value in self.iter_tree_attrs(obj):
File "/home/tromey/Space/Trunk/gcc-python-plugin/gccutils.py", line 143, in iter_tree_attrs
value = getattr(obj, name)
RuntimeError: attribute 'fullname' is only available when compiling C++ code
}}}
The text was updated successfully, but these errors were encountered:
* Add new function ``gcc.is_cplusplus`` to determine if we are
compiling C++
* Use ``gcc.is_cplusplus`` in gccutils to not iterate over fullname
when we are not using C++ (resolvesdavidmalcolm#72)
* Allow accessing ``gcc.Type.sizeof`` to raise a TypeError while
pretty-printing to be silently ignored and not added to attributes
* Use ``pp_newline_and_flush`` instead of ``pp_newline`` in
``PyGccPrettyPrinter_as_string`` when we are using GCC 5.3 or
later (as this provides the historic functionality relied upon)
jackrosenthal
added a commit
to jackrosenthal/gcc-python-plugin
that referenced
this issue
May 29, 2019
* Add new function ``gcc.is_cplusplus`` to determine if we are
compiling C++
* Use ``gcc.is_cplusplus`` in gccutils to not iterate over fullname
when we are not using C++ (resolvesdavidmalcolm#72)
* Allow accessing ``gcc.Type.sizeof`` to raise a TypeError while
pretty-printing to be silently ignored and not added to attributes
* Use ``pp_newline_and_flush`` instead of ``pp_newline`` in
``PyGccPrettyPrinter_as_string`` when we are using GCC 5.3 or
later (as this provides the historic functionality relied upon)
I got this error when trying to use gccutils.pformat when compiling C code:
{{{
File "/home/tromey/Space/Trunk/gcc-python-plugin/cvtlisp.py", line 204, in map_tree
print gccutils.pformat(tree)
File "/home/tromey/Space/Trunk/gcc-python-plugin/gccutils.py", line 123, in pformat
return pp.pformat(obj)
File "/home/tromey/Space/Trunk/gcc-python-plugin/gccutils.py", line 176, in pformat
return self._recursive_format_obj(obj, set(), 0)
File "/home/tromey/Space/Trunk/gcc-python-plugin/gccutils.py", line 208, in _recursive_format_obj
visited, depth + 1)
File "/home/tromey/Space/Trunk/gcc-python-plugin/gccutils.py", line 199, in _recursive_format_obj
for name, value in self.iter_tree_attrs(obj):
File "/home/tromey/Space/Trunk/gcc-python-plugin/gccutils.py", line 143, in iter_tree_attrs
value = getattr(obj, name)
RuntimeError: attribute 'fullname' is only available when compiling C++ code
}}}
The text was updated successfully, but these errors were encountered: