File: bug761307.c-expected

package info (click to toggle)
vala 0.56.18-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 57,468 kB
  • sloc: ansic: 581,293; sh: 5,334; makefile: 3,946; xml: 3,161; yacc: 1,219; lex: 374; javascript: 23
file content (76 lines) | stat: -rw-r--r-- 1,580 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* basic_types_bug761307.c generated by valac, the Vala compiler
 * generated from basic_types_bug761307.vala, do not modify */

#include <stdlib.h>
#include <string.h>
#include <glib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define _g_free0(var) (var = (g_free (var), NULL))

VALA_EXTERN void bar (const gchar** str,
          gint str_length1);
VALA_EXTERN void foo (void);
static void _vala_main (void);

void
bar (const gchar** str,
     gint str_length1)
{
}

void
foo (void)
{
	const gchar* s1 = NULL;
	const gchar* s2 = NULL;
	const gchar** _tmp0_;
	const gchar** _tmp1_;
	gint _tmp1__length1;
	gchar* s3 = NULL;
	gchar* _tmp2_;
	s1 = "ABC";
	s2 = "CDE";
	_tmp0_ = g_new0 (const gchar*, 2 + 1);
	_tmp0_[0] = s1;
	_tmp0_[1] = s2;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 2;
	bar (_tmp1_, (gint) 2);
	_tmp1_ = (g_free (_tmp1_), NULL);
	_tmp2_ = g_strdup_printf ("%s%s", s1, s2);
	s3 = _tmp2_;
	_g_free0 (s3);
}

static void
_vala_main (void)
{
	foo ();
}

int
main (int argc,
      char ** argv)
{
	_vala_main ();
	return 0;
}