Esempio n. 1
0
void test (void)
{
  void *p0 = null ();
  void *px = &px;

  f1_1 (p0);   /* { dg-warning "argument 1 null where non-null expected " } */
  f1_1 (px);

  f2_1 (p0, px);  /* { dg-warning "argument 1 null" } */
  f2_1 (px, p0);
  f2_1 (p0, p0);  /* { dg-warning "argument 1 null" } */

  f2_1_2 (p0, px);  /* { dg-warning "argument 1 null" } */
  f2_1_2 (px, p0);  /* { dg-warning "argument 2 null" } */
  f2_1_2 (p0, p0);  /* { dg-warning "argument 1 null" } */
  /* { dg-warning "argument 2 null" "argument 2" { target *-*-* } .-1 } */

  f3_1_3 (p0, px, px);  /* { dg-warning "argument 1 null" } */
  f3_1_3 (px, p0, px);
  f3_1_3 (px, px, p0);  /* { dg-warning "argument 3 null" } */
  f3_1_3 (p0, p0, px);  /* { dg-warning "argument 1 null" } */
  f3_1_3 (px, p0, p0);  /* { dg-warning "argument 3 null" } */
  f3_1_3 (p0, p0, p0);  /* { dg-warning "argument 1 null" } */
  /* { dg-warning "argument 3 null" "argument 3" { target *-*-* } .-1 } */

  g4_1_2_4 (p0, px, px, px);  /* { dg-warning "argument 1 null" } */
  g4_1_2_4 (px, p0, px, px);  /* { dg-warning "argument 2 null" } */
  g4_1_2_4 (px, px, p0, px);
  g4_1_2_4 (px, px, px, p0);  /* { dg-warning "argument 4 null" } */

  g4_1_3_4 (p0, px, px, px);  /* { dg-warning "argument 1 null" } */
  g4_1_3_4 (px, p0, px, px);
  g4_1_3_4 (px, px, p0, px);  /* { dg-warning "argument 3 null" } */
  g4_1_3_4 (px, px, px, p0);  /* { dg-warning "argument 4 null" } */

  g4_2_3_4 (p0, px, px, px);
  g4_2_3_4 (px, p0, px, px);  /* { dg-warning "argument 2 null" } */
  g4_2_3_4 (px, px, p0, px);  /* { dg-warning "argument 3 null" } */
  g4_2_3_4 (px, px, px, p0);  /* { dg-warning "argument 4 null" } */

  g4_all (p0, px, px, px);  /* { dg-warning "argument 1 null" } */
  g4_all (px, p0, px, px);  /* { dg-warning "argument 2 null" } */
  g4_all (px, px, p0, px);  /* { dg-warning "argument 3 null" } */
  g4_all (px, px, px, p0);  /* { dg-warning "argument 4 null" } */

  g16_1_3_5_7_11_13 (px, px, px, px, px, px, px, px,
		     px, px, px, px, px, px, px, px);

  g16_1_3_5_7_11_13 (px, p0, px, p0, px, p0, px, p0, p0, p0, px, p0, p0, p0, p0, p0);   /* { dg-warning "argument 13 null" } */
}
Esempio n. 2
0
void TestScrollWinCanvas::PaintShapes(wxDC& dc)
{
	TemplateCanvas::PaintShapes(dc);
	dc.SetPen(*wxBLACK_PEN);
	dc.SetBrush(*wxRED_BRUSH);
	dc.SetTextForeground(*wxBLACK);
	dc.SetTextBackground(wxTransparentColor); // new const in wxWidgets 2.9.1
	dc.SetFont(*wxSMALL_FONT);
	int y=10;
	int dy=20;
	int i=0;
	dc.DrawLine(30,30, 250,15);
	dc.DrawText("*wxSMALL_FONT", 10, y+(dy*i++));
	dc.SetFont(*wxNORMAL_FONT);
	dc.DrawText("*wxNORMAL_FONT", 10, y+(dy*i++));
	dc.SetFont(wxSystemSettings::GetFont(wxSYS_ANSI_VAR_FONT));
	dc.DrawText("GetFont(wxSYS_ANSI_VAR_FONT)", 10, y+(dy*i++));
	dc.SetFont(wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT));
	dc.DrawText("GetFont(wxSYS_SYSTEM_FONT)", 10, y+(dy*i++));
	wxFont f1(8, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
	dc.SetFont(f1);
	dc.DrawText("8, wxFONTFAMILY_SWISS", 10, y+(dy*i++));
	wxFont f1_1(9, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
	dc.SetFont(f1_1);
	dc.DrawText("9, wxFONTFAMILY_SWISS", 10, y+(dy*i++));	
	wxFont f2(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
	dc.SetFont(f2);
	dc.DrawText("10, wxFONTFAMILY_SWISS", 10, y+(dy*i++));
	wxFont f3(11, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
	dc.SetFont(f3);
	dc.DrawText("11, wxFONTFAMILY_SWISS", 10, y+(dy*i++));
	wxFont f4(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
	dc.SetFont(f4);
	dc.DrawText("12, wxFONTFAMILY_SWISS", 10, y+(dy*i++));
	wxFont f5(14, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
	dc.SetFont(f5);
	dc.DrawText("14, wxFONTFAMILY_SWISS", 10, y+(dy*i++));
	f5.SetPointSize(16);
	dc.SetFont(f5);
	dc.DrawText("16, wxFONTFAMILY_SWISS", 10, y+(dy*i++));
	f5.SetPixelSize(wxSize(0,15));
	dc.SetFont(f5);
	dc.DrawText("SetPixelSize(0,15), wxFONTFAMILY_SWISS", 10, y+(dy*i++));
	f5.SetPixelSize(wxSize(0,10));
	dc.SetFont(f5);
	dc.DrawText("SetPixelSize(0,10), wxFONTFAMILY_SWISS", 10, y+(dy*i++));
	f5.SetPixelSize(wxSize(0,20));
	dc.SetFont(f5);
	dc.DrawText("SetPixelSize(0,20), wxFONTFAMILY_SWISS", 10, y+(dy*i++));
	dc.SetFont(*GdaConst::small_font);
	dc.DrawText("*GdaConst::small_font", 10, y+(dy*i++));
	dc.SetFont(*GdaConst::medium_font);
	dc.DrawText("*GdaConst::medium_font", 10, y+(dy*i++));
	dc.SetTextForeground(GdaConst::selectable_fill_color);
	dc.SetFont(*GdaConst::large_font);
	dc.DrawText("*GdaConst::large_font", 10, y+(dy*i++));
}