Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000026 [cparser] parser minor N/A 2008-12-14 11:45 2010-08-16 14:03
Reporter Matze View Status public  
Assigned To Matze
Priority normal Resolution fixed  
Status closed   Product Version 0.9.10
Summary 0000026: attribute parsing doesn't apply attributes to the correct places
Description Depending on the actual attribute we have to target the attribute effects towards:
* A type
* A struct/union/(enum?)/class
* A single entity (variable/function)

This also depends on the position of the attribute. Examples:

int __attribute__((aligned)) a, b; applied to the type (and therefore a and b)
int a __attribute((aligned)), b; applied to entity "a" only
struct __attribute__((packed)) A { int x, y; }; applied to struct
__attribute__((packed)) struct A { int x, y; }; ignored
struct A { int x, y; } __attribute__((packed)); applied to struct
...
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000063)
Matze (administrator)
2009-03-03 21:23

Status update:
I do have new code which correctly assigns attributes to types and entities where needed.

Not checked in yet, because:
* the error checking isn't as complete as in the current code
* Some obscure MS extensions like __based aren't parsed currently
  (__declspec is parsed though)
(0000069)
Matze (administrator)
2009-03-08 00:51

testcase in firm_testsuite/C/gnu99/attributes4.c created
(parts were already in firm_testsuite/C/gnu/attributes3.c)

The rewritten code is checked in by now (but we have no support for attribute((packed)) yet. So I'm not 100% sure if the attributes get assigned correctly for structs.
(0000091)
Matze (administrator)
2010-08-16 14:03

should be good enough for some time now.

- Issue History
Date Modified Username Field Change
2008-12-14 11:45 Matze New Issue
2008-12-14 11:45 Matze Status new => confirmed
2008-12-14 11:45 Matze Relationship added child of 0000025
2009-03-03 21:23 Matze Note Added: 0000063
2009-03-03 21:23 Matze Assigned To => Matze
2009-03-03 21:23 Matze Status confirmed => assigned
2009-03-08 00:51 Matze Note Added: 0000069
2010-08-16 14:03 Matze Note Added: 0000091
2010-08-16 14:03 Matze Resolution open => fixed
2010-08-16 14:03 Matze version => 0.9.10
2010-08-16 14:03 Matze Status assigned => closed


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