• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- main2.c -------------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 #include <stdio.h>
10 #include <stdlib.h>
11 
main(int argc,const char * argv[])12 int main(int argc, const char* argv[])
13 {
14     int *int_ptr = (int *)malloc(sizeof(int));
15     *int_ptr = 7;
16     printf("Hello, world!\n");
17     printf("Now not crash %d\n", *int_ptr); // Not crash here.
18 }
19