警告:-Wuninitialized不支持没有-O [英] warning: -Wuninitialized is not supported without -O

查看:588
本文介绍了警告:-Wuninitialized不支持没有-O的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我激活了所有类型的警告后,编译器提出了这个问题:

The compiler complains about this, after I activated all kind of warnings:

对于MyApp_Prefix.pch,编译器说:

For MyApp_Prefix.pch the compiler says:


警告:-Wuninitialized不支持
,不支持-O

warning: -Wuninitialized is not supported without -O

这是否意味着?

推荐答案

在纯英语中,编译器抱怨,它不能检查未初始化的变量, 。

In plain English, the compiler is complaining that it cannot check for uninitialized variables unless you turn on compiler optimization.

如果优化程序关闭,并且没有所有必需的数据,则它不会做相当多的详尽的代码路径分析。如果某个变量未初始化或未初始化。

Chances are that it doesn't do quite such an exhaustive code path analysis if the optimizer is turned off and thus doesn't have all the necessary data to work out if a certain variable is uninitialized or not.

投诉的最简单的解决方法是关闭非优化构建的警告,并确保它已打开优化发布构建。

Simplest fix for the complaint is to turn off the warning for non-optimized builds and ensure that it's turned on for optimized release builds.

这篇关于警告:-Wuninitialized不支持没有-O的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆