- change: Remove the compiler set option "Syntax error when object larger than"
This commit is contained in:
parent
d8f9cef762
commit
7bc4365573
3
NEWS.md
3
NEWS.md
|
@ -1,9 +1,8 @@
|
|||
Red Panda C++ Version 2.20
|
||||
|
||||
- change: Change compiler set option "Syntax error when object larger than" to "Syntax error when function frame larger than"
|
||||
- change: Remove the compiler set option "Syntax error when object larger than"
|
||||
- fix: Projects created by some templates are not correct when editor's default encoding is not utf8.
|
||||
- fix: File/Project visit histories are not correctly saved when clearing.
|
||||
- change: Default max function frame size is 2MB under windows / 8MB others.
|
||||
- fix: Octal numeric escape sequences is not correctly syntax highlighted.
|
||||
- enhancement: Refine suggestion info when try debug and the compiler settings are not correct.
|
||||
- enhancement: Open the options dialog/project options dialog when user want to correct compiler settings for debug.
|
||||
|
|
|
@ -423,11 +423,6 @@ QString Compiler::getCCompileArguments(bool checkSyntax)
|
|||
foreach(const QString& param, params)
|
||||
result += " "+ parseMacros(param);
|
||||
}
|
||||
} else {
|
||||
if (compilerSet()->maxFrameSize()>0 && compilerSet()->warnLargeFrame()) {
|
||||
long long size = std::ceil(compilerSet()->maxFrameSize()*1024*1024);
|
||||
result += QString(" -Werror=frame-larger-than=%1").arg(size);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -468,11 +463,6 @@ QString Compiler::getCppCompileArguments(bool checkSyntax)
|
|||
foreach(const QString& param, params)
|
||||
result += " "+ parseMacros(param);
|
||||
}
|
||||
} else {
|
||||
if (compilerSet()->maxFrameSize()>0 && compilerSet()->warnLargeFrame()) {
|
||||
long long size = std::ceil(compilerSet()->maxFrameSize()*1024*1024);
|
||||
result += QString(" -Werror=frame-larger-than=%1").arg(size);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -1669,8 +1669,6 @@ Settings::CompilerSet::CompilerSet():
|
|||
mAutoAddCharsetParams{false},
|
||||
mExecCharset{ENCODING_SYSTEM_DEFAULT},
|
||||
mStaticLink{false},
|
||||
mMaxFrameSize{0},
|
||||
mWarnLargeObject{false},
|
||||
mPreprocessingSuffix{DEFAULT_PREPROCESSING_SUFFIX},
|
||||
mCompilationProperSuffix{DEFAULT_COMPILATION_SUFFIX},
|
||||
mAssemblingSuffix{DEFAULT_ASSEMBLING_SUFFIX},
|
||||
|
@ -1685,8 +1683,6 @@ Settings::CompilerSet::CompilerSet(const QString& compilerFolder, const QString&
|
|||
mAutoAddCharsetParams{true},
|
||||
mExecCharset{ENCODING_SYSTEM_DEFAULT},
|
||||
mStaticLink{true},
|
||||
mMaxFrameSize{0},
|
||||
mWarnLargeObject{false},
|
||||
mPreprocessingSuffix{DEFAULT_PREPROCESSING_SUFFIX},
|
||||
mCompilationProperSuffix{DEFAULT_COMPILATION_SUFFIX},
|
||||
mAssemblingSuffix{DEFAULT_ASSEMBLING_SUFFIX},
|
||||
|
@ -1742,8 +1738,6 @@ Settings::CompilerSet::CompilerSet(const Settings::CompilerSet &set):
|
|||
mAutoAddCharsetParams{set.mAutoAddCharsetParams},
|
||||
mExecCharset{set.mExecCharset},
|
||||
mStaticLink{set.mStaticLink},
|
||||
mMaxFrameSize{set.mMaxFrameSize},
|
||||
mWarnLargeObject{set.mWarnLargeObject},
|
||||
|
||||
mPreprocessingSuffix{set.mPreprocessingSuffix},
|
||||
mCompilationProperSuffix{set.mCompilationProperSuffix},
|
||||
|
@ -2569,26 +2563,6 @@ QByteArray Settings::CompilerSet::getCompilerOutput(const QString &binDir, const
|
|||
return result.trimmed();
|
||||
}
|
||||
|
||||
bool Settings::CompilerSet::warnLargeFrame() const
|
||||
{
|
||||
return mWarnLargeObject;
|
||||
}
|
||||
|
||||
void Settings::CompilerSet::setWarnLargeFrame(bool newWarnLargeObject)
|
||||
{
|
||||
mWarnLargeObject = newWarnLargeObject;
|
||||
}
|
||||
|
||||
double Settings::CompilerSet::maxFrameSize() const
|
||||
{
|
||||
return mMaxFrameSize;
|
||||
}
|
||||
|
||||
void Settings::CompilerSet::setMaxFrameSize(double maxFrameSize)
|
||||
{
|
||||
mMaxFrameSize = maxFrameSize;
|
||||
}
|
||||
|
||||
Settings::CompilerSet::CompilationStage Settings::CompilerSet::compilationStage() const
|
||||
{
|
||||
return mCompilationStage;
|
||||
|
@ -2758,12 +2732,6 @@ static void setReleaseOptions(Settings::PCompilerSet pSet) {
|
|||
pSet->setCompileOption(LINK_CMD_OPT_STRIP_EXE, COMPILER_OPTION_ON);
|
||||
pSet->setCompileOption(CC_CMD_OPT_USE_PIPE, COMPILER_OPTION_ON);
|
||||
pSet->setStaticLink(true);
|
||||
#ifdef Q_OS_WIN
|
||||
pSet->setMaxFrameSize(2); //default stack size of gcc is 2MB on windows
|
||||
#else
|
||||
pSet->setMaxFrameSize(8);
|
||||
#endif
|
||||
pSet->setWarnLargeFrame(false);
|
||||
}
|
||||
|
||||
static void setDebugOptions(Settings::PCompilerSet pSet, bool enableAsan = false) {
|
||||
|
@ -2783,12 +2751,6 @@ static void setDebugOptions(Settings::PCompilerSet pSet, bool enableAsan = false
|
|||
pSet->setCompileOption(CC_CMD_OPT_STACK_PROTECTOR, "-strong");
|
||||
pSet->setStaticLink(false);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
pSet->setMaxFrameSize(2); //default stack size of gcc is 2MB on windows
|
||||
#else
|
||||
pSet->setMaxFrameSize(8);
|
||||
#endif
|
||||
pSet->setWarnLargeFrame(true);
|
||||
}
|
||||
|
||||
bool Settings::CompilerSets::addSets(const QString &folder, const QString& c_prog) {
|
||||
|
@ -3130,9 +3092,6 @@ void Settings::CompilerSets::saveSet(int index)
|
|||
mSettings->mSettings.setValue("AddCharset", pSet->autoAddCharsetParams());
|
||||
mSettings->mSettings.setValue("StaticLink", pSet->staticLink());
|
||||
mSettings->mSettings.setValue("ExecCharset", pSet->execCharset());
|
||||
mSettings->mSettings.setValue("WarnLargeFrame",pSet->warnLargeFrame());
|
||||
mSettings->mSettings.setValue("MaxFrameSize",pSet->maxFrameSize());
|
||||
|
||||
|
||||
mSettings->mSettings.setValue("preprocessingSuffix", pSet->preprocessingSuffix());
|
||||
mSettings->mSettings.setValue("compilationProperSuffix", pSet->compilationProperSuffix());
|
||||
|
@ -3216,8 +3175,6 @@ Settings::PCompilerSet Settings::CompilerSets::loadSet(int index)
|
|||
pSet->setCustomLinkParams(mSettings->mSettings.value("customLinkParams").toString());
|
||||
pSet->setAutoAddCharsetParams(mSettings->mSettings.value("AddCharset", true).toBool());
|
||||
pSet->setStaticLink(mSettings->mSettings.value("StaticLink", false).toBool());
|
||||
pSet->setMaxFrameSize(mSettings->mSettings.value("MaxFrameSize", 2).toDouble());
|
||||
pSet->setWarnLargeFrame(mSettings->mSettings.value("WarnLargeFrame", false).toBool());
|
||||
|
||||
pSet->setExecCharset(mSettings->mSettings.value("ExecCharset", ENCODING_SYSTEM_DEFAULT).toString());
|
||||
if (pSet->execCharset().isEmpty()) {
|
||||
|
|
|
@ -1427,12 +1427,6 @@ public:
|
|||
bool isOutputExecutable();
|
||||
bool isOutputExecutable(Settings::CompilerSet::CompilationStage stage);
|
||||
|
||||
double maxFrameSize() const;
|
||||
void setMaxFrameSize(double maxFrameSize);
|
||||
|
||||
bool warnLargeFrame() const;
|
||||
void setWarnLargeFrame(bool newWarnLargeObject);
|
||||
|
||||
private:
|
||||
void setDirectories(const QString& binDir, CompilerType mCompilerType);
|
||||
//load hard defines
|
||||
|
@ -1478,8 +1472,6 @@ public:
|
|||
bool mAutoAddCharsetParams;
|
||||
QString mExecCharset;
|
||||
bool mStaticLink;
|
||||
double mMaxFrameSize;
|
||||
bool mWarnLargeObject;
|
||||
|
||||
QString mPreprocessingSuffix;
|
||||
QString mCompilationProperSuffix;
|
||||
|
|
|
@ -88,8 +88,6 @@ static void loadCompilerSetSettings(Settings::PCompilerSet pSet, Ui::CompilerSet
|
|||
ui->txtCustomLinkParams->setEnabled(pSet->useCustomLinkParams());
|
||||
ui->chkAutoAddCharset->setChecked(pSet->autoAddCharsetParams());
|
||||
ui->chkStaticLink->setChecked(pSet->staticLink());
|
||||
ui->spinMaxObjectSize->setValue(pSet->maxFrameSize());
|
||||
ui->chkWarnLargeObject->setChecked(pSet->warnLargeFrame());
|
||||
//rest tabs in the options widget
|
||||
|
||||
ui->optionTabs->resetUI(pSet,pSet->compileOptions());
|
||||
|
@ -201,8 +199,6 @@ void CompilerSetOptionWidget::saveCurrentCompilerSet()
|
|||
pSet->setCustomLinkParams(ui->txtCustomLinkParams->toPlainText().trimmed());
|
||||
pSet->setAutoAddCharsetParams(ui->chkAutoAddCharset->isChecked());
|
||||
pSet->setStaticLink(ui->chkStaticLink->isChecked());
|
||||
pSet->setMaxFrameSize(ui->spinMaxObjectSize->value());
|
||||
pSet->setWarnLargeFrame(ui->chkWarnLargeObject->isChecked());
|
||||
|
||||
pSet->setCCompiler(ui->txtCCompiler->text().trimmed());
|
||||
pSet->setCppCompiler(ui->txtCppCompiler->text().trimmed());
|
||||
|
|
|
@ -171,57 +171,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkWarnLargeObject">
|
||||
<property name="text">
|
||||
<string>Syntax error for stack frame larger than</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinMaxObjectSize">
|
||||
<property name="suffix">
|
||||
<string>MB</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.500000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkUseCustomCompilerParams">
|
||||
<property name="text">
|
||||
|
|
Loading…
Reference in New Issue