Click here to Skip to main content
14,573,882 members

C / C++ / MFC

 
AnswerRe: Win32 Function To Convert Floating Point Number To Character String Pin
Richard MacCutchan26-Jan-16 22:27
mveRichard MacCutchan26-Jan-16 22:27 
QuestionC, Win32 API: l need help with tab control [Solved] Pin
Member 1213944226-Jan-16 11:20
MemberMember 1213944226-Jan-16 11:20 
AnswerRe: C, Win32 API: l need help with tab control Pin
bling26-Jan-16 12:03
Memberbling26-Jan-16 12:03 
GeneralRe: C, Win32 API: l need help with tab control Pin
Member 1213944226-Jan-16 21:07
MemberMember 1213944226-Jan-16 21:07 
GeneralRe: C, Win32 API: l need help with tab control Pin
bling27-Jan-16 14:15
Memberbling27-Jan-16 14:15 
AnswerRe: C, Win32 API: l need help with tab control Pin
Richard MacCutchan26-Jan-16 22:34
mveRichard MacCutchan26-Jan-16 22:34 
QuestionRe: C, Win32 API: l need help with tab control Pin
David Crow27-Jan-16 4:27
MemberDavid Crow27-Jan-16 4:27 
QuestionToo many initializers error in MSVC. Pin
Brisingr Aerowing20-Jan-16 13:02
professionalBrisingr Aerowing20-Jan-16 13:02 
I am trying to build XULRunner from sources, and I am getting a 'Too Many Initializers' error, and I have no idea why.

The code is as follows (Register is a struct):

static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { edi, eax, ebx, ecx, esi, edx };


the values in the array are defined earlier in the file (X86Encoding is a namespace, and the values are defined in an enum):

static MOZ_CONSTEXPR_VAR Register eax = { X86Encoding::rax };
static MOZ_CONSTEXPR_VAR Register ecx = { X86Encoding::rcx };
static MOZ_CONSTEXPR_VAR Register edx = { X86Encoding::rdx };
static MOZ_CONSTEXPR_VAR Register ebx = { X86Encoding::rbx };
static MOZ_CONSTEXPR_VAR Register esp = { X86Encoding::rsp };
static MOZ_CONSTEXPR_VAR Register ebp = { X86Encoding::rbp };
static MOZ_CONSTEXPR_VAR Register esi = { X86Encoding::rsi };
static MOZ_CONSTEXPR_VAR Register edi = { X86Encoding::rdi };


The Register struct is defined as follows:

struct Register {
    typedef Registers Codes;
    typedef Codes::Encoding Encoding;
    typedef Codes::Code Code;
    typedef Codes::SetType SetType;

    Codes::Encoding reg_;
    static Register FromCode(Code i) {
        MOZ_ASSERT(i < Registers::Total);
        Register r = { Encoding(i) };
        return r;
    }
    static Register FromName(const char* name) {
        Code code = Registers::FromName(name);
        Register r = { Encoding(code) };
        return r;
    }
    MOZ_CONSTEXPR Code code() const {
        return Code(reg_);
    }
    Encoding encoding() const {
        MOZ_ASSERT(Code(reg_) < Registers::Total);
        return reg_;
    }
    const char* name() const {
        return Registers::GetName(code());
    }
    bool operator ==(Register other) const {
        return reg_ == other.reg_;
    }
    bool operator !=(Register other) const {
        return reg_ != other.reg_;
    }
    bool volatile_() const {
        return !!((SetType(1) << code()) & Registers::VolatileMask);
    }
    bool aliases(const Register& other) const {
        return reg_ == other.reg_;
    }
    uint32_t numAliased() const {
        return 1;
    }

    // N.B. FloatRegister is an explicit outparam here because msvc-2010
    // miscompiled it on win64 when the value was simply returned.  This
    // now has an explicit outparam for compatability.
    void aliased(uint32_t aliasIdx, Register* ret) const {
        MOZ_ASSERT(aliasIdx == 0);
        *ret = *this;
    }

    SetType alignedOrDominatedAliasedSet() const {
        return SetType(1) << code();
    }

    static uint32_t SetSize(SetType x) {
        return Codes::SetSize(x);
    }
    static uint32_t FirstBit(SetType x) {
        return Codes::FirstBit(x);
    }
    static uint32_t LastBit(SetType x) {
        return Codes::LastBit(x);
    }
};


I am using Visual Studio 2015/MSV14 Update 1.

This build is for x86, but it does the same thing for a x64 build (this code is shared for both architectures)
What do you get when you cross a joke with a rhetorical question?

The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.

Do questions with multiple question marks annoy you???

SuggestionRe: Too many initializers error in MSVC. Pin
David Crow22-Jan-16 4:49
MemberDavid Crow22-Jan-16 4:49 
GeneralRe: Too many initializers error in MSVC. Pin
Brisingr Aerowing22-Jan-16 5:02
professionalBrisingr Aerowing22-Jan-16 5:02 
GeneralRe: Too many initializers error in MSVC. Pin
Richard MacCutchan22-Jan-16 6:35
mveRichard MacCutchan22-Jan-16 6:35 
GeneralRe: Too many initializers error in MSVC. Pin
Brisingr Aerowing12-Feb-16 5:55
professionalBrisingr Aerowing12-Feb-16 5:55 
QuestionC++ Namespace scope bug / feature Pin
Anthony Mushrow20-Jan-16 3:00
professionalAnthony Mushrow20-Jan-16 3:00 
AnswerRe: C++ Namespace scope bug / feature Pin
Richard MacCutchan20-Jan-16 4:38
mveRichard MacCutchan20-Jan-16 4:38 
AnswerRe: C++ Namespace scope bug / feature Pin
Aescleal20-Jan-16 6:51
MemberAescleal20-Jan-16 6:51 
GeneralRe: C++ Namespace scope bug / feature Pin
Anthony Mushrow20-Jan-16 8:04
professionalAnthony Mushrow20-Jan-16 8:04 
QuestionNeed to communicate between two server processes Pin
Member 1227424519-Jan-16 8:57
MemberMember 1227424519-Jan-16 8:57 
SuggestionRe: Need to communicate between two server processes Pin
David Crow19-Jan-16 9:41
MemberDavid Crow19-Jan-16 9:41 
SuggestionRe: Need to communicate between two server processes Pin
Midi_Mick19-Jan-16 18:37
professionalMidi_Mick19-Jan-16 18:37 
QuestionC1001 internal Compiler error VS 2012 pro Pin
ForNow19-Jan-16 4:14
MemberForNow19-Jan-16 4:14 
AnswerRe: C1001 internal Compiler error VS 2012 pro Pin
Richard MacCutchan19-Jan-16 4:21
mveRichard MacCutchan19-Jan-16 4:21 
GeneralRe: C1001 internal Compiler error VS 2012 pro Pin
ForNow19-Jan-16 8:07
MemberForNow19-Jan-16 8:07 
AnswerRe: C1001 internal Compiler error VS 2012 pro Pin
Jochen Arndt19-Jan-16 4:30
professionalJochen Arndt19-Jan-16 4:30 
GeneralRe: C1001 internal Compiler error VS 2012 pro Pin
ForNow19-Jan-16 8:05
MemberForNow19-Jan-16 8:05 
QuestionC, Win32: l need help getting user input[Solved] Pin
Member 1213944217-Jan-16 11:41
MemberMember 1213944217-Jan-16 11:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.