LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-04-2009, 01:36 AM   #1
fuzzyBuzz
Member
 
Registered: Sep 2005
Posts: 34

Rep: Reputation: 15
Compiling C++ for x86_64 and get warning: 'cdecl' attribute ignored


Hi,

I defined a type of the following form:
typedef void (*myFunc)(int, int) __attribute__((cdecl));
warning: 'cdecl' attribute ignored

When compiling on X86_64 using g++ 4.1.2

Can anyone please explain why am i getting this warning? Is it because cdecl calling convention is not supported on X86_64? If so, what is the calling convention which used?

TIA
 
Old 05-04-2009, 04:34 PM   #2
clvic
Member
 
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Blog Entries: 2

Rep: Reputation: 45
I think that x86_64 has its own calling convention, that cannot be compared to cdecl.
I'll make a search on the web, I wonder whether all other languages (fortran etc...) now follow this new calling convention.
 
Old 05-25-2012, 09:24 AM   #3
zekki
LQ Newbie
 
Registered: May 2012
Posts: 2

Rep: Reputation: Disabled
Question

I resume this old thread because I have the same problem.
I read from Wikipedia that on x86_64 gcc uses the System V AMD64 ABI calling convention, instead of cdecl (https://en.wikipedia.org/wiki/X86_ca...em_V_AMD64_ABI).
But how to use it? I can't find any sintax examples...
 
Old 05-27-2012, 11:17 AM   #4
zekki
LQ Newbie
 
Registered: May 2012
Posts: 2

Rep: Reputation: Disabled
Anyone?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling gyachi on x86_64?? Hungry ghost Linux - Software 2 03-01-2011 09:48 PM
warning: ‘__stdcall__’ attribute ignored yhus Programming 1 11-03-2008 07:51 AM
compiling kernel 2.6.16-1.2080_FC5-x86_64 fbarsoba Linux - Software 1 05-18-2006 10:01 PM
Compiling Linux kernel for x86_64 khaleel5000 Linux - Kernel 4 04-25-2006 12:29 AM
Compiling x86_64 kernel michaelsanford Linux - General 4 04-28-2005 10:59 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration