User forums > Help

-std=c++11 not working (CB12.11)

<< < (4/7) > >>

osdt:

--- Quote from: MortenMacFly on April 22, 2013, 09:34:47 pm ---No problem: At runtime, when you load a project file its managed correctly as the options are being sorted into the appropriate settings. So, if we decide to change an option (i.e. move it to "default") its no problem after you updated C::B and re-opening the project file.

--- End quote ---
With the current (magic) implementation, I'm not sure what will happen ;)


--- Quote from: MortenMacFly on April 22, 2013, 09:34:47 pm ---In a single run, however, there is no way to find out what you mean when you tell the compiler on one setting page to enable and on the other to disable an option.

--- End quote ---
It's easy to find out what I mean by '-Wall' ... I want to see the string '-Wall' in the compiler's command line, nothing else. If CB removes the option from 'other options', I don't have explicitly turned off the checkable switch, it's off by default.


--- Quote from: MortenMacFly on April 22, 2013, 09:34:47 pm ---... What ever magic we do here is wrong in 50% of the cases. How would you decide in such a case?

--- End quote ---
The best decision would be: do no magic at all if you can't be sure that it's ok to do so, serious.

If you want to provide the feature of "automatically convert 'other options' to switches", ask the user beforehand. But never do it silently. As you said: your magic will be wrong in 50% of the cases. In My case likely to 100% ;D

- osdt

oBFusCATed:

--- Quote from: osdt on April 22, 2013, 10:44:32 pm ---If you want to provide the feature of "automatically convert 'other options' to switches", ask the user beforehand. But never do it silently. As you said: your magic will be wrong in 50% of the cases. In My case likely to 100% ;D

--- End quote ---
Hm, post the exact steps to show your problem.

As far as I know and seen this in action: If you type -Wall in other options and the compiler has a switch for -Wall, -Wall will be removed from other options and the switch will be enabled. This means that the command used for compilation won't change.

Do you see something else?

stahta01:

--- Quote from: oBFusCATed on April 22, 2013, 10:52:09 pm ---
--- Quote from: osdt on April 22, 2013, 10:44:32 pm ---If you want to provide the feature of "automatically convert 'other options' to switches", ask the user beforehand. But never do it silently. As you said: your magic will be wrong in 50% of the cases. In My case likely to 100% ;D

--- End quote ---
Hm, post the exact steps to show your problem.

As far as I know and seen this in action: If you type -Wall in other options and the compiler has a switch for -Wall, -Wall will be removed from other options and the switch will be enabled. This means that the command used for compilation won't change.

Do you see something else?

--- End quote ---

Yes, using 12.11 on Windows it just removes the project other option; it does NOT set "-Wall" in the compiler options.

Tim S.

Alpha:
Untested:

--- Code: ---Index: src/plugins/compilergcc/compileroptionsdlg.cpp
===================================================================
--- src/plugins/compilergcc/compileroptionsdlg.cpp (revision 9000)
+++ src/plugins/compilergcc/compileroptionsdlg.cpp (working copy)
@@ -912,17 +971,6 @@
                     m_LinkerOptions.Insert(copt->additionalLibs, 0);
             }
         }
-        else
-        {
-            // for disabled options, remove relative text option *and*
-            // relative linker option
-            int idx = m_CompilerOptions.Index(copt->option);
-            if (idx != wxNOT_FOUND)
-                m_CompilerOptions.RemoveAt(idx, 1);
-            idx = m_LinkerOptions.Index(copt->additionalLibs);
-            if (idx != wxNOT_FOUND)
-                m_LinkerOptions.RemoveAt(idx, 1);
-        }
     }
 
     // linker options and libs

--- End code ---

However, what is the expected behaviour?

MortenMacFly:

--- Quote from: stahta01 on April 23, 2013, 03:20:02 am ---Yes, using 12.11 on Windows it just removes the project other option; it does NOT set "-Wall" in the compiler options.

--- End quote ---
Yes, of course not - for me this is expected behaviour.

I'm afraid osdt still fails to see the full picture:
if you hit OK and "-Wall" in the checkable list is off, but you have -Wall in "other options" defined to be "on", then you tell C::B on the one hand "do not use -Wall" and on the other hand "do use -Wall".

And we do no magi here at all - we just decided that the checkable list over-rules "other options". It has been like that since the beginning and only a very few people complained. Most were happy when we told how it is working behind the scenes. So I still don't see any need for change here, sorry.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version