What does the fpermissive flag do?(fpermissive 标志有什么作用?)
问题描述
我只是想知道 -fpermissive 标志在 g++ 编译器中的作用是什么?我得到:
I'm just wondering what the -fpermissive flag does in the g++ compiler? I am getting:
错误:取临时地址[-fpermissive]
error: taking address of temporary [-fpermissive]
我可以通过向编译器提供 -fpermissive 标志来解决这个问题.
which I can solve by giving the  -fpermissive flag to the compiler. 
编辑:我刚刚找到了导致临时地址错误部分的原因!我现在就去修复那个部分.
EDIT: I just found what was causing the temporary address error part! I'm going to fix that part right now.
推荐答案
来自 文档:
-fpermissive
将一些关于不符合代码的诊断从错误降级为警告.因此,使用 -fpermissive 将允许编译一些不合格的代码.
-fpermissive
Downgrade some diagnostics about nonconformant code from errors to warnings. Thus, using-fpermissivewill allow some nonconforming code to compile.
底线:不要使用,除非您知道自己在做什么!
Bottom line: don't use it unless you know what you are doing!
这篇关于fpermissive 标志有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:fpermissive 标志有什么作用?
				
        
 
            
        基础教程推荐
- 常量变量在标题中不起作用 2021-01-01
 - 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
 - 如何检查GTK+3.0中的小部件类型? 2022-11-30
 - 如何在 C++ 中初始化静态常量成员? 2022-01-01
 - 我有静态或动态 boost 库吗? 2021-01-01
 - C++结构和函数声明。为什么它不能编译? 2022-11-07
 - 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
 - 在 C++ 中计算滚动/移动平均值 2021-01-01
 - 如何通过C程序打开命令提示符Cmd 2022-12-09
 - 这个宏可以转换成函数吗? 2022-01-01
 
    	
    	
    	
    	
    	
    	
    	
    	
						
						
						
						
						
				
				
				
				