Question on TREE_CODE_CLASS of 's'

Jim Wilson wilson@tuliptree.org
Thu Jun 19 01:08:00 GMT 2003


Richard Kenner wrote:
> Why are the statements in c-common.h in class 'e', not 's'?

Why do you ask?  The answer you want may depend on why you are asking.
Apparently no one knows, so I am willing to offer some guesses.

The code originally came from template support in the C++ front end. 
Perhaps the distinction was not important there, or 's' did not work 
correctly there.

The code was moved into c-common.h when we moved to functions-as-trees. 
  It is interesting to note that c-common.h has its own STATEMENT_CODE_P 
macro which is used to distinguish statements from expressions instead 
of using TREE_CODE_CLASS.  Perhaps the default definitions of 's' are 
not appropriate for the current code in the C++/C front ends.  Or 
perhaps this is a legacy left over from earlier code.

Jim








More information about the Gcc mailing list