gcc源代码分析,expand_expr_stmt()函数
来源:互联网 发布:最好的中文编程语言 编辑:程序博客网 时间:2024/05/17 10:27
终于调用的顺序清楚了,yyparse()函数调用了expand_expr_stmt()函数,expand_expr_stmt()函数调用了expand_expr()函数。
下面的语法规则对应printf("Hello,World!\n");。
stmt:
compstmt {}
| expr ';'
{ emit_line_note (input_filename, lineno);
/* Do default conversion if safe and possibly important,
in case within ({...}). */
if ((TREE_CODE (TREE_TYPE ($1)) == ARRAY_TYPE
&& lvalue_p ($1))
|| TREE_CODE (TREE_TYPE ($1)) == FUNCTION_TYPE)
$1 = default_conversion ($1);
expand_expr_stmt ($1);
clear_momentary (); }
/* Generate RTL to evaluate the expression EXP
and remember it in case this is the VALUE in a ({... VALUE; }) constr. */void
expand_expr_stmt (exp)
tree exp;
{
/* If -W, warn about statements with no side effects,
except inside a ({...}) where they may be useful. */
if (expr_stmts_for_value == 0 && exp != error_mark_node)
{
if (! TREE_VOLATILE (exp) && (extra_warnings || warn_unused))
warning_with_file_and_line (emit_filename, emit_lineno,
"statement with no effect");
else if (warn_unused)
warn_if_unused_value (exp);
}
last_expr_type = TREE_TYPE (exp);
if (! flag_syntax_only)
last_expr_value = expand_expr (exp, expr_stmts_for_value ? 0 : const0_rtx,
VOIDmode, 0);
emit_queue ();
}
2 0
- gcc源代码分析,expand_expr_stmt()函数
- gcc源代码分析,在expand_call ()函数 和expand_expr_stmt ()函数的开始处加入debug_tree ()函数
- gcc源代码分析 gen_rtx()函数
- gcc源代码分析emit_call_insn()函数
- GCC源代码分析,recog_memoized()函数
- gcc源代码分析,output_asm_insn()函数
- gcc源代码分析,rtx_alloc函数分析
- gcc源代码分析,build_string ()函数分析
- gcc源代码分析,build_function_call ()函数分析
- gcc源代码分析,build_pointer_type ()函数分析
- gcc源代码分析,actualparameterlist ()函数分析
- gcc源代码分析,default_conversion ()函数分析
- gcc源代码分析,get_parm_info ()函数分析
- gcc源代码分析,grokdeclarator()函数分析
- gcc源代码分析,grokparms ()函数分析
- gcc源代码分析之gen_call_value()函数
- gcc源代码分析,debug_rtx()函数,利器啊
- gcc源代码分析,debug_tree()函数的利用
- C++内存分配秘籍—new,malloc,GlobalAlloc详解
- 黑马程序员-----IO之数据流
- PostgreSQL 升级详细步骤
- BMP文件格式初步学习
- 四种策略防止用户将表单重复提交
- gcc源代码分析,expand_expr_stmt()函数
- vmware下安装centos x86_64出现“kernel requires an x86_64 cpu, but only detected ”
- 49-一个偶数总能表示为两个素数之和
- windows安装程序无法将windows配置为在此计算机的硬件上运行
- 快速排序-随机选择,寻找最小的第K个数
- android ViewHolder模式超简洁写法
- HTML5画布像素图像的焦点
- 几种能力
- Multisim出现步长问题 step time