• 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
GCC for i386 allows 'invalid suffix "f" on integer constant'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: GCC for i386 allows 'invalid suffix "f" on integer constant'
  • From: Dirk Stegemann <email@hidden>
  • Date: Thu, 19 Jan 2006 19:18:53 +0200

Hello all,

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.


Which behaviour is correct, or are both?
Why is that?
Is there a specification which handles this case?


Thanks, Dirk Stegemann

_______________________________________________
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: Eric Albert <email@hidden>
  • Prev by Date: Re: After 2.2.1: 'AliasRecord' has no member named 'aliasSize'. UNTRUE!!
  • Next by Date: Re: TraceEventByName
  • Previous by thread: Re: Templates, STL, const_iterator supported?
  • Next by thread: Re: GCC for i386 allows 'invalid suffix "f" on integer constant'
  • Index(es):
    • Date
    • Thread