Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

not a clang bug

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.22 sec, absolute running time: 0.14 sec, cpu time: 0 sec, memory peak: 3 Mb, absolute service time: 0,47 sec 
edit mode |  history
Warning(s):
source_file.cpp:11:10: warning: no previous prototype for function 'make_1' [-Wmissing-prototypes]
Resource make_1() { return Resource(1); }
         ^
source_file.cpp:12:10: warning: no previous prototype for function 'make_2' [-Wmissing-prototypes]
Resource make_2() { throw std::runtime_error("failed"); }
         ^
source_file.cpp:20:6: warning: no previous prototype for function 'process' [-Wmissing-prototypes]
void process(User) {}
     ^
source_file.cpp:25:17: warning: generalized initializer lists are incompatible with C++98 [-Wc++98-compat]
        process({make_1(), make_2()});
                ^
source_file.cpp:28:2: warning: C++98 requires newline at end of file [-Wc++98-compat-pedantic]
}
 ^
5 warnings generated.
create
destroy

    
                
λ
.NET NoSQL database for rapid development