Aqui hay algo muy misterioso... acabo de probar el mismo codigo que me enviaste 
pero NO COMPILA... yo tengo 4.2.3 y tu 4.3.2 No creo que sea por la version ya 
que los ejemplos y posts que vi son desde el 2006, luego que en 4.2.3 ya no 
funcione y despues en 4.3.2 este andando de vuelta esta muy raro.

La "solucion" fue meter las constantes en hexadecimal... cambiar de version de 
gcc no resulta opcion pues el software es para distribucion opensource y la 
idea es que corra en cualquier compilador.

En fin saludos

-------------------------------------
$ cat bin.c
#include <stdio.h>

int main(void)
{
  int i = 0b101010;

  printf("%d\n", i);

  return 0;
}
$ gcc bin.c -o bin
bin.c:5:11: error: invalid suffix "b101010" on integer constant
$ gcc --version
gcc (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-------------------------------------



----- Original Message ----

|b...@bli:~$ cat binario.c
|#include <stdio.h>
|
|int main(void)
|{
|   int i = 0b101010;
|
|   printf("%d\n", i);
|
|   return 0;
|}
|
|b...@bli:~$ gcc binario.c -o binario && ./binario
|42
|b...@bli:~$ gcc --version
|gcc (Debian 4.3.2-1.1) 4.3.2
|Copyright (C) 2008 Free Software Foundation, Inc.
|This is free software; see the source for copying conditions.  There is
|NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- 
bli



      

Reply via email to