LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1284 - Support bitwidth attribute in llvm-gcc
Summary: Support bitwidth attribute in llvm-gcc
Status: RESOLVED WONTFIX
Alias: None
Product: tools
Classification: Unclassified
Component: llvm-gcc (show other bugs)
Version: trunk
Hardware: All All
: P enhancement
Assignee: Reid Spencer
URL:
Keywords: new-feature
Depends on:
Blocks:
 
Reported: 2007-03-28 11:45 PDT by Reid Spencer
Modified: 2010-07-29 17:26 PDT (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reid Spencer 2007-03-28 11:45:30 PDT
The llvm-gcc tool should support a bitwidth attribute that permits arbitrary
precision bit width integers to be used. This PR is to track the development of
that feature. 

As with other type attributes, this feature requests that:

__attribute__((bitwidth(N)))

be recognized by llvm-gcc so that things like:

typedef int __attribute__((bitwidth(23))

could be used to make a signed 23 bit integer.
Comment 1 Reid Spencer 2007-04-25 23:27:50 PDT
This won't happen for 2.0
Comment 2 Reid Spencer 2007-05-17 17:06:22 PDT
The code for this feature and related ones is done. It includes the beginnings
of APIntification of llvm-gcc (to represent integer constants with APInt instead
of with a pair of HOST_WIDE_INT) as well as several builtin functions for
manipulating integers of various bit widths.

The patch for this will be submitted sometime in the 2.1 time frame.
Comment 3 Sheng Zhou 2008-01-14 20:04:38 PST
Hi Chris and Reid,

Is it the time to commit the patch after public review ?


Sheng.
Comment 4 Chris Lattner 2008-01-14 22:22:35 PST
Please wait until after 2.2 branches (wednesday), we are working on stabilizing things right now.
Comment 5 Chris Lattner 2010-07-29 17:26:04 PDT
We don't plan to do this in llvm-gcc.