• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: GCC for i386 allows 'invalid suffix "f" on integer constant'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC for i386 allows 'invalid suffix "f" on integer constant'


  • Subject: Re: GCC for i386 allows 'invalid suffix "f" on integer constant'
  • From: Eric Albert <email@hidden>
  • Date: Fri, 20 Jan 2006 10:13:50 -0800

On Jan 20, 2006, at 9:28 AM, Dirk Stegemann wrote:

Am 19.01.2006 um 19:27 schrieb Eric Albert:

On Jan 19, 2006, at 9:18 AM, Dirk Stegemann wrote:

following code doesn't compile on GCC for ppc (neither with GCC 3.3 nor with GCC 4.0):


int main (int argc, char * const argv[]) {

    float f = 2f;

    return 0;
}

GCC gives an error:
/path/to/main.cpp:3:12: error: invalid suffix "f" on integer constant


The same code compiled using GCC 4.0 to generate i386 code doesn't even give a warning.

This doesn't compile for me with gcc for Intel.

To add some additional info:
although the GCC compiles the code, at runtime the variable doesn't seem to be properly initialised -- it contain arbitrary values.

I still can't reproduce this. Which version of gcc are you using (gcc -v), and what's the exact command line used to invoke the compiler?


-Eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: GCC for i386 allows 'invalid suffix "f" on integer constant'
      • From: Dirk Stegemann <email@hidden>
References: 
 >GCC for i386 allows 'invalid suffix "f" on integer constant' (From: Dirk Stegemann <email@hidden>)
 >Re: GCC for i386 allows 'invalid suffix "f" on integer constant' (From: Eric Albert <email@hidden>)
 >Re: GCC for i386 allows 'invalid suffix "f" on integer constant' (From: Dirk Stegemann <email@hidden>)

  • Prev by Date: Re: Exception on a simple arithmetic problem
  • Next by Date: Re: Exception on a simple arithmetic problem
  • Previous by thread: Re: GCC for i386 allows 'invalid suffix "f" on integer constant'
  • Next by thread: Re: GCC for i386 allows 'invalid suffix "f" on integer constant'
  • Index(es):
    • Date
    • Thread