Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Refactoring Bug-designated initializer,C99/Clang

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
smallscript Posted - Feb 10 2017 : 11:30:50 AM
MSVC (ANSI) C99, supports designated initializers, as does Clang in C++.

With structs initialized using C99 designated initializers, the refactoring tool breaks any code containing members being refactored/renamed because it does not recognize them.

-- David
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 10 2017 : 3:49:39 PM
Do you mean code like this:

struct Person
{   
    int height;
    int weight;
    int age;
};

int main()
{
    Person p { .age = 18 };
}


which I picked up from here:

http://stackoverflow.com/questions/18731707/why-does-c11-not-support-designated-initializer-list-as-c99

If so, which IDE are you working in? This does not compile in C++ in VS2017 RC4.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000