This is the mail archive of the gcc@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] | |
On Wed, 13 Aug 2008, Aldy Hernandez wrote:
It seems to me that the only approach here would be to provide caret diagnostics, because reconstructing the original sources from GENERIC seems like a loosing proposition.
In some cases the only useful place to find the expression is in the
preprocessed sources, not the original sources, so you want to be able to
print an expression extracted from those not just one extracted from
pointers into the original sources. But in either case extracting an
expressions using some form of beginning and ending locations would give
better results than reconstructing a representation of the expression from
trees.
$ clang t.c
t.c:4:15: error: called object is not a function or function pointer
({ int i; })();
~~~~~~~~~~~~^
t.c:13:9: error: called object is not a function or function pointer
((B)a)();
~~~~~~^
t.c:17:10: error: called object is not a function or function pointer
(p - q)();
~~~~~~~^
t.c:18:18: error: called object is not a function or function pointer
(p < q ? p : q)();
~~~~~~~~~~~~~~~^
4 diagnostics generated.| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |