c/10430: converting double word to quad word, cltd, cdq, 3.2.2

ebotcazou@gcc.gnu.org ebotcazou@gcc.gnu.org
Fri Apr 18 07:45:00 GMT 2003


Synopsis: converting double word to quad word, cltd, cdq, 3.2.2

State-Changed-From-To: open->closed
State-Changed-By: ebotcazou
State-Changed-When: Fri Apr 18 07:45:23 2003
State-Changed-Why:
    Not a bug. The code is equivalent to
    
    extern int bar(void);
    
    main()
    {
      foo((unsigned long long int) bar());
    }
    
    Since the return type of bar() is signed, the return value
    must be sign-extended according to the ISO C standard, hence
    the use of 'cltd'.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10430



More information about the Gcc-prs mailing list