OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [Wparentheses-1.c] - Blame information for rev 853

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Copyright (C) 2001 Free Software Foundation, Inc.  */
2
 
3
/* { dg-do compile } */
4
/* { dg-options -Wparentheses } */
5
 
6
/* Source: Neil Booth, 1 Nov 2001.  PR 3170, 3422 - bogus warnings
7
   about suggesting parentheses.  */
8
 
9
int foo (int a, int b)
10
{
11
  int c = (a && b) || 0; /* { dg-bogus "suggest parentheses" }  */
12
  c = a && b || 0;               /* { dg-warning "suggest parentheses" }  */
13
 
14
  return (a && b && 1) || 0;     /* { dg-bogus "suggest parentheses" }  */
15
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.