Re: MyC Compiled can't compile {}

2009-12-28 Thread Paul McFerrin
I don't have a Linux,  This code has served me very well for years.  It 
is perfect.  I used to be a developer with Glenn Fowler and nmake 
developing compiler probe code for nmake.  If your compiler can't 
compile it, then something is wrong.


I also get error messages about the C compiler with reconfigure 
scripts used to reconfigure a makefile.


If someone can advised me of which packages to uninstall, I'll be happy 
to re-install then,


Christopher Faylor wrote:

On Sun, Dec 27, 2009 at 11:08:52PM -0500, Paul McFerrin wrote:
  

My C compiler is at:
$ ls -l /bin/cc.exe

lrwxrwxrwx 1 paul None 20 2009-12-23 16:09 /bin/cc.exe - 
/etc/alternatives/cc


From my years of experiences, {} is the simplest version of a 
to-be-compiled C program.  It is syntaxily correct.  in any case, the 
above DID work in 1.7-68.



It is not a syntactically correct C program.  Try it on linux if you
are not convinced.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple


  


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: MyC Compiled can't compile {}

2009-12-28 Thread Paul McFerrin

Well, after all of this discussion, my C compiler IS BROKEN.  I.E.:

echo main{} test.c
/usr/local/mysql-5/mysql-5.1.41.$ cc -O test.c
test.c:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘{’ token

/usr/local/mysql-5/mysql-5.1.41.$ echo main(){} test.c
/usr/local/mysql-5/mysql-5.1.41.$ cc -O test.c
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: 
crt0.o: No such file: No such file or directory

collect2: ld returned 1 exit status

My suggestion is to completely UNINSTALL C Compiler packages and 
restalled then.  If others agree, could someome tell me which packages 
to uninstall?  Your installation may be working, but mine isn't.


Dave Korn wrote:

Paul McFerrin wrote:
  

I discover my C compiler is broken while performing a configure.



  The compiler is fine.

  

$ echo {} test.c



  Your testcase is nonsense.

  

$ cc -O test.c -o test
test.c:1: error: expected identifier or ‘(’ before ‘{’ token



  The compiler correctly told you so.  What were you expecting?  (Also, what
is 'cc'?  Softlink perhaps?)

cheers,
  DaveK

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple


  


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: MyC Compiled can't compile {}

2009-12-28 Thread Greg Chicares
On 2009-12-28 15:26Z, Paul McFerrin wrote:
 Well, after all of this discussion, my C compiler IS BROKEN.  I.E.:

To try your test program with a different compiler, paste it here:
  http://www.comeaucomputing.com/tryitout

 echo main{} test.c

If you want a minimal C program that's valid everywhere, use:
  $echo int main() {return 0;} test.c
making sure the file ends in a newline character.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: MyC Compiled can't compile {}

2009-12-28 Thread Christopher Faylor
On Mon, Dec 28, 2009 at 10:09:09AM -0500, Paul McFerrin wrote:
I don't have a Linux,  This code has served me very well for years.  It 
is perfect.

Arguing this point is really not winning you any points.  Your case
obviously doesn't work with either gcc 3.4 or gcc 4.x.  So, it has
not worked for years.

I used to be a developer with Glenn Fowler and nmake developing
compiler probe code for nmake.  If your compiler can't compile it,
then something is wrong.

If you truly think this is a compiler problem then you should report it
to gcc AT gcc DOT gnu DOT org.  But, be prepared to have your skin
seared from your body.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: MyC Compiled can't compile {}

2009-12-28 Thread Christopher Faylor
On Mon, Dec 28, 2009 at 03:57:29PM +, Greg Chicares wrote:
On 2009-12-28 15:26Z, Paul McFerrin wrote:
 Well, after all of this discussion, my C compiler IS BROKEN.  I.E.:

To try your test program with a different compiler, paste it here:
  http://www.comeaucomputing.com/tryitout

 echo main{} test.c

If you want a minimal C program that's valid everywhere, use:
  $echo int main() {return 0;} test.c
making sure the file ends in a newline character.

Or, the OP could use the test case that Dave Korn suggested:

http://cygwin.com/ml/cygwin/2009-12/msg00943.html

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: MyC Compiled can't compile {}

2009-12-28 Thread Tim Prince

Paul McFerrin wrote:

Well, after all of this discussion, my C compiler IS BROKEN.  I.E.:

echo main{} test.c
/usr/local/mysql-5/mysql-5.1.41.$ cc -O test.c
test.c:1: error: expected =, ,, ;, asm or __attribute__ before { token
/usr/local/mysql-5/mysql-5.1.41.$ echo main(){} test.c
/usr/local/mysql-5/mysql-5.1.41.$ cc -O test.c
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: 
crt0.o: No such file: No such file or directory

collect2: ld returned 1 exit status

My suggestion is to completely UNINSTALL C Compiler packages and 
restalled then.  If others agree, could someome tell me which packages 
to uninstall?  Your installation may be working, but mine isn't.



If I haven't been confused by the abysmal quoting style, you've 
neglected the package find tool on the cygwin home page.  This indicates 
that the base cygwin runtime includes crt0.o (which appears in /usr/lib).


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



MyC Compiled can't compile {}

2009-12-27 Thread Paul McFerrin

I discover my C compiler is broken while performing a configure.

$ echo {} test.c
$ cc -O test.c -o test
test.c:1: error: expected identifier or ‘(’ before ‘{’ token
/usr/local/mysql-5/mysql-5.1.41.$ cc -V test.c -o test
cc: couldn't run 'i686-pc-cygwin-gcc-test.c': No such file or directory
/usr/local/mysql-5/mysql-5.1.41.$ cc -v test.c -o test
Using built-in specs.
Target: i686-pc-cygwin
Configured with: 
/gnu/gcc/releases/packaging/4.3.4-3/gcc4-4.3.4-3/src/gcc-4.3.4/configure 
--srcdir=/gnu/gcc/releases/packaging/4.3.4-3/gcc4-4.3.4-3/src/gcc-4.3.4 
--prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin 
--libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var 
--sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man 
--datadir=/usr/share --infodir=/usr/share/info --mandir=/usr/share/man 
-v --with-gmp=/usr --with-mpfr=/usr --enable-bootstrap 
--enable-version-specific-runtime-libs --with-slibdir=/usr/bin 
--libexecdir=/usr/lib --enable-static --enable-shared 
--enable-shared-libgcc --disable-__cxa_atexit --with-gnu-ld 
--with-gnu-as --with-dwarf2 --disable-sjlj-exceptions 
--enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --disable-symvers 
--enable-libjava --program-suffix=-4 --enable-libgomp --enable-libssp 
--enable-libada --enable-threads=posix --with-arch=i686 
--with-tune=generic --enable-libgcj-sublibs CC=gcc-4 CXX=g++-4 
CC_FOR_TARGET=gcc-4 CXX_FOR_TARGET=g++-4 GNATMAKE_FOR_TARGET=gnatmake 
GNATBIND_FOR_TARGET=gnatbind AS=/opt/gcc-tools/bin/as.exe 
AS_FOR_TARGET=/opt/gcc-tools/bin/as.exe LD=/opt/gcc-tools/bin/ld.exe 
LD_FOR_TARGET=/opt/gcc-tools/bin/ld.exe 
--with-ecj-jar=/usr/share/java/ecj.jar

Thread model: posix
gcc version 4.3.4 20090804 (release) 1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-o' 'test.exe' '-mtune=generic' '-march=i686'
/usr/lib/gcc/i686-pc-cygwin/4.3.4/cc1.exe -quiet -v -D__CYGWIN32__ 
-D__CYGWIN__ -Dunix -D__unix__ -D__unix -idirafter 
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api -idirafter 
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/lib/../../include/w32api 
test.c -quiet -dumpbase test.c -mtune=generic -march=i686 -auxbase test 
-version -o /c/DOCUME~1/Paul/LOCALS~1/Temp/ccb2jZrY.s
ignoring nonexistent directory 
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/include
ignoring duplicate directory 
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/lib/../../include/w32api

#include ... search starts here:
#include ... search starts here:
/usr/local/include
/usr/lib/gcc/i686-pc-cygwin/4.3.4/include
/usr/lib/gcc/i686-pc-cygwin/4.3.4/include-fixed
/usr/include
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api
End of search list.
GNU C (GCC) version 4.3.4 20090804 (release) 1 (i686-pc-cygwin)
compiled by GNU C version 4.3.4 20090804 (release) 1, GMP version 4.3.1, 
MPFR version 2.4.1-p5.

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d5cdab7e958df0270fe64611765e0bb6
test.c:1: error: expected identifier or ‘(’ before ‘{’ token

This is a 1.7.1-1 system.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: MyC Compiled can't compile {}

2009-12-27 Thread Dave Korn
Paul McFerrin wrote:
 I discover my C compiler is broken while performing a configure.

  The compiler is fine.

 $ echo {} test.c

  Your testcase is nonsense.

 $ cc -O test.c -o test
 test.c:1: error: expected identifier or ‘(’ before ‘{’ token

  The compiler correctly told you so.  What were you expecting?  (Also, what
is 'cc'?  Softlink perhaps?)

cheers,
  DaveK

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: MyC Compiled can't compile {}

2009-12-27 Thread Paul McFerrin

My C compiler is at:
$ ls -l /bin/cc.exe

lrwxrwxrwx 1 paul None 20 2009-12-23 16:09 /bin/cc.exe - 
/etc/alternatives/cc


From my years of experiences, {} is the simplest version of a 
to-be-compiled C program.  It is syntaxily correct.  in any case, the 
above DID work in 1.7-68.


I was doing a configure when it failed the first time:
checking for C compiler default output file name...
configure: error: in `/usr/local/mysql-5/mysql-5.1.41':
configure: error: C compiler cannot create executables
See `config.log' for more details.

== config.log  =
configure:4098: result: /bin/pdflatex
configure:4108: checking for makeindex
configure:4126: found /bin/makeindex
configure:4139: result: /bin/makeindex
configure:4395: checking whether build environment is sane
configure:4438: result: yes
configure:4441: checking whether make sets $(MAKE)
configure:4463: result: yes
configure:4539: checking for gawk
configure:4566: result: gawk
configure:4625: checking for gcc
configure:4641: found /bin/gcc
configure:4652: result: gcc
configure:4884: checking for C compiler version
configure:4892: gcc --version 5
gcc (GCC) 4.3.4 20090804 (release) 1
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.

configure:4896: $? = 0
configure:4903: gcc -v 5
Using built-in specs.

Does this help you???


Dave Korn wrote:

Paul McFerrin wrote:
  

I discover my C compiler is broken while performing a configure.



  The compiler is fine.

  

$ echo {} test.c



  Your testcase is nonsense.

  

$ cc -O test.c -o test
test.c:1: error: expected identifier or ‘(’ before ‘{’ token



  The compiler correctly told you so.  What were you expecting?  (Also, what
is 'cc'?  Softlink perhaps?)

cheers,
  DaveK

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple


  


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: MyC Compiled can't compile {}

2009-12-27 Thread Dave Korn
Paul McFerrin wrote:

 From my years of experiences, {} is the simplest version of a
 to-be-compiled C program.  

  No it isn't.

 It is syntaxily correct.  

  No it isn't.

 in any case, the above DID work in 1.7-68.

  No it didn't.  Your code is gibberish and has never worked on anything 
anywhere.


  You're probably having a terrible mis-remembering accident based on having
once seen something like main(){} somewhere.

cheers,
  DaveK


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: MyC Compiled can't compile {}

2009-12-27 Thread Christopher Faylor
On Sun, Dec 27, 2009 at 11:08:52PM -0500, Paul McFerrin wrote:
My C compiler is at:
$ ls -l /bin/cc.exe

lrwxrwxrwx 1 paul None 20 2009-12-23 16:09 /bin/cc.exe - 
/etc/alternatives/cc

 From my years of experiences, {} is the simplest version of a 
to-be-compiled C program.  It is syntaxily correct.  in any case, the 
above DID work in 1.7-68.

It is not a syntactically correct C program.  Try it on linux if you
are not convinced.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple