Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000042 [cparser] semantic major always 2009-03-03 01:50 2009-05-15 16:51
Reporter moritz View Status public  
Assigned To Matze
Priority normal Resolution fixed  
Status closed   Product Version 0.9.8
Summary 0000042: Prototype with __attribute__((__cdecl__) not considered compatible to one without it
Description Testcase firm_testsuite/C/cdecl.c reports this error message:

cdecl_test.c:2: error: declaration 'int__cdecl func(int)' is incompatible with 'int func(int)' (declared at line 1)
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000068)
Matze (administrator)
2009-03-08 00:43

moved to firm_testsuite/C/gnu99/cdecl.c

function types with different calling conventions are not consider compatible (which is probably fine), but we need exceptions for multiple delcarations then...
(0000071)
Matze (administrator)
2009-03-08 01:03

Seems gcc totally ignores calling convention when testing for function type compatibility. As gcc is the de-factor standard we have to do that too, although it's not the right thing to do IMO.

Done in r25628

A warning about a duplicate declaration remains, but that is for another time and another bug :)
(0000074)
moritz (manager)
2009-03-08 11:06

Ahm... isn't cdecl the default C calling convention, so both function declarations have the same type from the perspective of the source code?
(0000076)
Matze (administrator)
2009-03-09 01:00

Oh indeed Moritz. So my last fix was wrong. The real problem is that calling convention isn't default initialized to cdecl then. Reopening
(0000077)
Matze (administrator)
2009-03-09 17:13

fixed the right way in r25648

- Issue History
Date Modified Username Field Change
2009-03-03 01:50 moritz New Issue
2009-03-03 21:15 Matze Status new => confirmed
2009-03-03 21:20 Matze version => 0.9.8
2009-03-08 00:43 Matze Note Added: 0000068
2009-03-08 01:03 Matze Note Added: 0000071
2009-03-08 01:03 Matze Assigned To => Matze
2009-03-08 01:03 Matze Status confirmed => resolved
2009-03-08 01:03 Matze Resolution open => fixed
2009-03-08 11:06 moritz Note Added: 0000074
2009-03-09 01:00 Matze Note Added: 0000076
2009-03-09 01:00 Matze Status resolved => confirmed
2009-03-09 01:00 Matze Resolution fixed => reopened
2009-03-09 17:13 Matze Note Added: 0000077
2009-03-09 17:13 Matze Status confirmed => resolved
2009-03-09 17:13 Matze Resolution reopened => fixed
2009-03-09 18:15 moritz Note View State: public: 74
2009-05-15 16:51 Matze Status resolved => closed


Mantis 1.1.5[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker