Uninitialised value was created by a stack allocation


  • Mod

    Ich habe entdeckt, daß die Namenkollissionen NUR in Konstruktoren passieren.

    struct B {
        protected: int T; // Na gut, leicht gekünstelt. Wer verwendet schon protected Variablen? Mit private wird es halt ein Compilerfehler, das ist 
                          // nach wie vor eine Kollision (aber nicht eine derart tückische!)
    };
    
    template <typename T>
    struct A : B {
        static const auto sizeofT = sizeof(T); // Aua
    };
    

    Lösung des Problems? Member und Template-Parameter (und Namen anderer Arten von Entitäten) unterschiedlich präfigieren. Bei Membern hau ich gern ein _ vor, außer sie sind public .



  • push 🙂

    cpp_Jungspund schrieb:

    Eines noch: Ich erhalte keinen Fehler mehr, dafür spuckt valgrind mir immer dieses hier als erstes aus. Irgendwas scheint ja doch noch nicht ganz richtig zu sein. Was bedeutet das?

    --24813-- WARNING: Serious error when reading debug info
    --24813-- When reading debug info from /lib/x86_64-linux-gnu/ld-2.22.so:
    --24813-- Ignoring non-Dwarf2/3/4 block in .debug_info
    --24813-- WARNING: Serious error when reading debug info
    --24813-- When reading debug info from /lib/x86_64-linux-gnu/ld-2.22.so:
    --24813-- Last block truncated in .debug_info; ignoring
    --24813-- WARNING: Serious error when reading debug info
    --24813-- When reading debug info from /lib/x86_64-linux-gnu/ld-2.22.so:
    --24813-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
    --24813-- WARNING: Serious error when reading debug info
    --24813-- When reading debug info from /lib/x86_64-linux-gnu/libm-2.22.so:
    --24813-- Ignoring non-Dwarf2/3/4 block in .debug_info
    --24813-- WARNING: Serious error when reading debug info
    --24813-- When reading debug info from /lib/x86_64-linux-gnu/libm-2.22.so:
    --24813-- Last block truncated in .debug_info; ignoring
    --24813-- WARNING: Serious error when reading debug info
    --24813-- When reading debug info from /lib/x86_64-linux-gnu/libm-2.22.so:
    --24813-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
    --24813-- WARNING: Serious error when reading debug info
    --24813-- When reading debug info from /lib/x86_64-linux-gnu/libc-2.22.so:
    --24813-- Ignoring non-Dwarf2/3/4 block in .debug_info
    --24813-- WARNING: Serious error when reading debug info
    --24813-- When reading debug info from /lib/x86_64-linux-gnu/libc-2.22.so:
    --24813-- Last block truncated in .debug_info; ignoring
    --24813-- WARNING: Serious error when reading debug info
    --24813-- When reading debug info from /lib/x86_64-linux-gnu/libc-2.22.so:
    --24813-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
    

  • Mod

    Hast du dies hier mal probiert?


Anmelden zum Antworten