From 819d2177089aa218fccd880cfd5c22dca7740e23 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 29 Oct 2022 20:51:31 +0800 Subject: [PATCH] - change: Don't turn on "Show some more warnings (-Wextra)" option by default for DEBUG compiler set --- NEWS.md | 1 + RedPandaIDE/compiler/compilerinfo.cpp | 7 ++++--- RedPandaIDE/settings.cpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index 7a55f187..15bb1baf 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,7 @@ Red Panda C++ Version 2.1 - change: remove "Optimize for the following machine" and "Optimize less, while maintaining full compatibility" options in the compiler setting panel, which are obseleted. - change: escape spaces in the executabe path under linux. - fix: Before run a project's executable, we should check timestamp for project files AND modification states of files openned in editor. + - change: Don't turn on "Show some more warnings (-Wextra)" option by default for DEBUG compiler set Red Panda C++ Version 2.0 diff --git a/RedPandaIDE/compiler/compilerinfo.cpp b/RedPandaIDE/compiler/compilerinfo.cpp index d31c8b34..8111ac18 100644 --- a/RedPandaIDE/compiler/compilerinfo.cpp +++ b/RedPandaIDE/compiler/compilerinfo.cpp @@ -50,14 +50,14 @@ void CompilerInfo::init() void CompilerInfo::prepareCompilerOptions() { QList> sl; - // C options - QString groupName = QObject::tr("C options"); + QString groupName; +// // C options + groupName = QObject::tr("C options"); addOption(CC_CMD_OPT_ANSI, QObject::tr("Support all ANSI standard C programs (-ansi)"), groupName, true, true, false, "-ansi"); addOption(CC_CMD_OPT_NO_ASM, QObject::tr("Do not recognize asm,inline or typeof as a keyword (-fno-asm)"), groupName, true, true, false, "-fno-asm"); addOption(CC_CMD_OPT_TRADITIONAL_CPP, QObject::tr("Imitate traditional C preprocessors (-traditional-cpp)"), groupName, true, true, false, "-traditional-cpp"); groupName = QObject::tr("Code Generation"); - addOption(CC_CMD_OPT_DEBUG_INFO, QObject::tr("Generate debugging information (-g3)"), groupName, true, true, false, "-g3"); // Optimization sl.clear(); sl.append(QPair("Low","1")); @@ -149,6 +149,7 @@ void CompilerInfo::prepareCompilerOptions() sl.append(QPair("64bit","64")); addOption(CC_CMD_OPT_POINTER_SIZE, QObject::tr("Compile with the following pointer size (-mx)"), groupName, true, true, true, "-m", sl); + addOption(CC_CMD_OPT_DEBUG_INFO, QObject::tr("Generate debugging information (-g3)"), groupName, true, true, false, "-g3"); addOption(CC_CMD_OPT_PROFILE_INFO, QObject::tr("Generate profiling info for analysis (-pg)"), groupName, true, true, true, "-pg"); // Warnings diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index ca4fb88b..318b486b 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -2551,7 +2551,7 @@ static void setReleaseOptions(Settings::PCompilerSet pSet) { static void setDebugOptions(Settings::PCompilerSet pSet) { pSet->setCompileOption(CC_CMD_OPT_DEBUG_INFO, COMPILER_OPTION_ON); pSet->setCompileOption(CC_CMD_OPT_WARNING_ALL, COMPILER_OPTION_ON); - pSet->setCompileOption(CC_CMD_OPT_WARNING_EXTRA, COMPILER_OPTION_ON); + //pSet->setCompileOption(CC_CMD_OPT_WARNING_EXTRA, COMPILER_OPTION_ON); pSet->setCompileOption(CC_CMD_OPT_USE_PIPE, COMPILER_OPTION_ON); #ifdef Q_OS_LINUX