Enums less than 32 bit?

Hi!
I tried to compile LyX with Sun Studio 12u1 on snv_132. I came accross this error:
Error: lyx::Debug::Type is not within the range of a long or unsigned long.
The source is:
     enum Type {
          NONE = 0,
          INFO = (1 << 0), // 1
          INIT = (1 << 1), // 2
          KEY = (1 << 2), // 4
          GUI = (1 << 3), // 8
          PARSER = (1 << 4), // 16
          LYXRC = (1 << 5), // 32
          KBMAP = (1 << 6), // 64
          LATEX = (1 << 7), // 128
          MATHED = (1 << 8), // 256 // Alejandro, please use this.
          FONT = (1 << 9), // 512
          TCLASS = (1 << 10), // 1024
          LYXVC = (1 << 11), // 2048
          LYXSERVER = (1 << 12), // 4096
          UNDO = (1 << 13), // 8192
          ACTION = (1 << 14), // 16384
          LYXLEX = (1 << 15),
          DEPEND = (1 << 16),
          INSETS = (1 << 17),
          FILES = (1 << 18),
          WORKAREA = (1 << 19),
          INSETTEXT = (1 << 20),
          GRAPHICS = (1 << 21),
          /// change tracking
          CHANGES = (1 << 22),
          EXTERNAL = (1 << 23),
          PAINTING = (1 << 24),
          SCROLLING = (1 << 25),
          MACROS = (1 << 26),
          ///     rtl-related
          RTL = (1 << 27),
          ///     locale related
          LOCALE = (1 << 28),
          ///     selection
          SELECTION = (1 << 29),
          DEBUG = (1 << 31),
          ANY = 0xffffffff
When I change the DEBUG to (1 << 30) it compiles without problems.
Why is that so?

(1 << 31) is a negative number; it makes enum values to span from -INT_MAX (lowest possible value for int) to UINT_MAX (highest possible value for unsigned int).
Naturally, it doesn't fit in type long (assuming 32-bit compilation) because of ANY constant as well as unsigned long because of DEBUG, which is negative.
When you change (1<<31) to (1u<<31), its type becomes unsigned and value large positive integer. Consequently, it allows enum to fit in with unsigned long.

Similar Messages

  • Question why has my balance on my itune account have totally disappeared when I have only been using it for less than a year? had still fair bit of money in it too. around $60

    Question why has my balance on my itune account have totally disappeared when I have only been using it for less than a year? had still fair bit of money in it too. around $60

    First, make sure you're logged into the iTunes Store using the account ID and password you set up, or used, when you redeemed your card/gift.  If you are, try signing out of the account and back in.
    If you're sure you are using the correct account and that you're signing in to the iTunes Store, and signing out and back in doesn't help, go to the Purchase History and review your purchases to make sure that you should indeed have a balance left. iTunes doesn't always refresh the balance it shows, so it's possible you spent the money and it just wasn't being reflected in the display. This display error can usually be corrected by logging out of the iTunes Store and then back in.
    If you confirm that you should have balance left but the iTunes Store isn't showing it correctly, send a message to the iTunes Store customer service department through the contact form you'll find by selecting the most applicable section of their Support page (select the Contact Support link and follow the instructions) and explain the problem to them.
    Good luck.

  • Z key in macbook pro pops up on right side. Little pin on scissor clip underneath has broken. No stress on computer, is this apple covered? Otherwise where do I get a new scissor clip. Less than 3 months old.

    On the Z key, the little scissor clip underneath on the right hand side has two little pointy bits which connect to the key, the top one of these has broken off and the key is barely hanging on, if pushed on the right side of the key, it pops up. I tried to push it back in but it keeps popping up.
    My mac is less than 3 months old. The computer has been treated well and has not been used rough or treated badly, I imagine it's just an accident while typing or a weak clip.
    Is this covered by Apple, if not where do I buy a new clip for under the key? -

    u can give try to using external enclosre and backup ur files. I hope u will get files back. or using external enclosre with ur hdd boot into Linux and try to mount ur harddisk.
    there are multiple no of tutorial to mount apple partion in Linux.

  • I have a manual that contains headings and index entries that contain less than and greater than characters, and . The Publish to Responsive HTML5 function escapes these correctly in the main body of the text but does not work correctly in either the C

    I have a manual that contains headings and index entries that contain less than and greater than characters, < and >. The Publish to Responsive HTML5 function escapes these correctly in the main body of the text but does not work correctly in either the Contents or the Index of the generated HTML. In the Contents the words are completely missing and in the index entries the '\' characters that are required in the markers remain in the entry but the leading less than symbol and the first character of the word is deleted; hence what should appear as <dataseries> appears as \ataseries\>. I believe this is a FMv12 bug. Has anyone else experienced this? Is the FM team aware and working on a fix. Any suggestions for a workaround?

    The Index issue is more complicated since in order to get the < and > into the index requires the entry itself to be escaped. So, in order to index '<x2settings>' you have to key '\<x2settings\>'. Looking at the generated index entry in the .js file we see '<key name=\"\\2settings\\&gt;\">. This is a bit of a mess and produces an index entry of '\2settings\>'. This ought to be '<key name=\"&amp;lt;x2settings&amp;gt;\" >'. I have tested this fix and it works - but the worst of it is that the first character of the index entry has been stripped out. Consequently I cannot fix this with a few global changes - and I have a lot of index entries of this type. I'm looking forward to a response to this since I cannot publish this document in its current state.  

  • IMovie Won't Let Me Trim Clip Length To Less Than 1.0 Seconds

    Anyone have any luck trimming clips down to less than 1.0 seconds?
    I'm doing some video editing on iMovie for which I want to trim clips down to about 0.4 to 0.6 seconds depending on the audio track I'm trying to match. I can't seem to get iMovie to let me trim a track down past 1.0 seconds. When I try to trim it, the length just stays at 1.0 seconds. I HAVE been able to take a clip that's 1.0 seconds, split it, and then end up with two clips of 0.5 seconds each. However, when I try to make any length adjustment on these shorter clips they automatically jump back out to 1.0 second lengths and I'm back to square one.
    Thanks in advance and happy iMovie-ing!

    I find that splitting a clip is much easier then trimming.
    http://help.apple.com/imovie/iphone/1.2/index.html#kna257fc915
    So I tend to scroll through to where I want to make and edit, and then split the clip, and delete the bit to cut out.
    And then you can go as close as about .4 seconds.
    Sadly iMovie iOS isn't really made for fast cuts.
    So the only advise I can give is to split clips to get them shorter.

  • Is two-pass VBR not needed if less than 60 minutes?

    Just curious... I've read that single-pass will result in the same quality as two-pass for projects less than 60 minutes.

    Single pass may result in superior quality. Two pass VBR is necessary to squeeze file sizes and bit rates to fit within DVD parameters.
    x

  • Less than Useless

    So for this newsgroup has been less than useless. Lots of questions, no
    answers at all.
    Has ANYONE gotten 6.0 to install under RH 7.1?
    Why do you end up with /tmp/install.dir.xxx/Solaris/resource/jre.tar.Z?

    For some reason not vouchsafed to us mortals, Red Hat 7.1 partitions the
    hard drive by major
    nodes in the directory tree - "/home" gets a partition, "/usr" gets one,
    "/var" gets one, etc.
    and the leftovers (such as /tmp) are crammed into a miniscule "/"
    partition. You can see this
    by issuing the "df" command. I did the following:
    mkdir /home/bea_tmp
    export IATEMPDIR=/home/bea_tmp
    then installed the package. Finally, a
    ulimit -s 2048
    is required before actually starting WebLogic - otherwise the Java VM's
    stack
    overflows and it segfaults.
    You can safely delete the IATEMPDIR after installation - it should be
    empty.
    Michael Girdley wrote:
    >
    Here's a workaround previously posted to the newsgroup:
    "Glen Austin" <[email protected]> wrote in message
    news:[email protected]...
    Found it. Same problem as on Oracle 8.1.7 on RedHat 7.1.
    1. Install the compat* RPMs from the RedHat 7.1 CD1 and CD2. These RPMs
    allow compatibility with RedHat 6.2.
    2. Put the following two statements in your environment prior to running
    the install.
    export LD_ASSUME_KERNEL=2.2.5
    . /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
    These two statements will allow you to run your shell in a 6.2compatibility
    mode, for glibc 2.1.3 instead of the new glibc 2.2.2 libs.
    It sounds to me like Sun needs to update the JDKs to support the new glibc
    and the 2.4 kernel. I'm not sure this is even BEA's problem?
    Glen Austin
    OmniSYS, Inc.
    "Glen Austin" <[email protected]> wrote in message
    news:[email protected]...
    I installed jdk 1.3.1 from java.sun.com on a RedHat 7.1 O/S.
    Originally, I was not pointing to the JDK correctly. I fixed the PATH,
    CLASSPATH, JAVA_HOME, JAVA_PATH to point to the jdk1.3.1 dir.
    Then I got an error saying that cut could not be found in /usr/bin, so I
    ln -s /bin/cut cut in the /usr/bin directory.
    I ran the install script a 3rd time and I'm seeing a [<defunct>] for myJava
    VM in a ps -aef entry, which is in the process list along with the WLS
    6.0
    SP1 install bin file. I will try it one more time, but it's not looking
    good.
    Glen Austin
    "Henri Jubin" <[email protected]> wrote in message
    news:[email protected]...
    You need to install the JDK 1.3.1 to have wls 6.0 working.
    The JDK could be found at the developpers zone at javasoft.
    root <[email protected]> wrote:
    i tried installing the wls by using the command :
    sh weblogic600sp1_linux.bin
    i got the message ,
    "Preparing to install..."
    and thats where it stops !
    any ideas ??
    cheers
    Pac
    There's a couple other possible solutions listed here in the group as well.
    Michael Girdley
    BEA Systems
    Learning WebLogic? http://learnweblogic.com
    Buy the only book covering J2EE & WebLogic 6:
    http://www.amazon.com/exec/obidos/ASIN/0130911119/learnweblogic/102-1778325-
    4765749
    "Steve Ahlstrom" <[email protected]> wrote in message
    news:[email protected]...
    I've got 10G+ free -- that's not the problem.
    I've seen many, MANY messages complaining about this particular problem
    over the last few weeks and not seen one offering a resolution.
    In article <[email protected]>, [email protected]
    says...
    This may be because you don't have enough disk space allocated
    under the directory in which the installer is trying to unzip
    the JRE part of your install. How much free space do you have on
    the disk corresponding to your /tmp directory? You need 100s of
    Mb free. If you haven't got enough you can set the IATEMPDIR
    environment variable to a different directory which has more
    space (e.g. export IATEMPDIR=/usr/tmp).
    I agree with you this newsgroup tedns to be a bit short on answers. :-)
    Chris
    Steve Ahlstrom <[email protected]> wrote:
    So for this newsgroup has been less than useless. Lots of questions,
    no
    answers at all.
    Has ANYONE gotten 6.0 to install under RH 7.1?
    Why do you end up with /tmp/install.dir.xxx/Solaris/resource/jre.tar.Z?

  • Why should texture size be less than power of 2?

    Hi!
    I just read in the packagerforiphone_devguide.pdf
    Make bitmaps in sizes that are close to, but less than, 2^n by 2^m bits. The dimensions do not have to be power of 2,
    but they should be close to a power of 2, without being larger. For example, a 31-by-15–pixel image renders faster
    than a 33-by-17–pixel image. (31 and 15 are just less than powers of 2: 32 and 16.) Such images also use memory
    more efficiently.
    can someone explain me this? As Gamedeveloper i'm used to have power of 2 textures. why should they be smaller than power of 2 instead of exactly power of 2?

    I have read that too, and it doesn't make sense. The article would have been a lot clearer if they had used 32x16 as the second example, instead of 33x17. Like you, I would almost expect advice that said to not exceed a power of 2, but it does't seem right to say that the exact power of 2 isn't recommended either.
    Hey, I just found an earlier passage that pretty well states that we're right, on page 34:
    "The GPU uses memory allocations that are powers of 2 for each dimension of the bitmap image. For example, the GPU can reserve memory in 512 x 1024 or 8 x 32 sizes. So a 9 x 15-pixel image takes up the same amount of memory as a 16 x 16-pixel image. For cached display objects, you may want to use dimensions that are close to powers of 2 (but not more) in each direction. For example, it is more efficient to use a 32 x 16-pixel display object than a 33 x 17-pixel display object."
    So there you go, a 32x16 bitmap does use less memory than a 33x17 bitmap.
    I think, or hope, that the later part was just making the point that you don't have to use exact powers of 2, but in doing so you want to not go over the power of 2. Hence using examples of 31x15 and 33x17. They didn't use 32x16 as an example because those are powers of 2, which wasn't what was being illustrated.

  • I have started migration système to transfert from hold Macbook pro to New MacBook air application starter successfully for several hours. But since more than 3 hours I got the message transferring Time zone paramètres with time left less than 1 minute.

    Hi
    I have started migration système to transfert from hold Macbook pro to New MacBook air
    Application starter successfully for several hours.
    But since more than 3 hours I got the message "transferring Time zone paramètres " with time left less than 1 minute.
    Any recommendation or suggestion to solve it ?
    Many tanks

    If it has run for 3 hours it's probably done and you can quit Migration Assistant and reboot the new computer. In the future rather than using Migration Assistant I would recommend using Startup Assistant which tends to be a bit more reliable and does not create a new user account as MA does. If  you're interested here is an article explaining Setup Assistant tips.
    Roger

  • Why does time machine go back less than a month?

    clearly, i'm doing something wrong...
    i'm in the process of cleaning up stuff from my external drives.  sometime in the fall, i switched my time machine backup to a larger drive.  i did my best to follow the instructions for transferring over a time machine backup, and it didn't work.  i still have the old TM database, but time machine wouldn't recognize it.  so i lived with it and got on with my life, starting a new TM backup.
    today, i just realized that it goes back less than a month.  what is THAT about?  before you ask, it's NOT a disk space issue.  on a 2 TB drive, i currently have 1.23 TB of available space.  there's plenty of ROOM for further backups, but it's just not keeping them.  please help... i love time machine, and it's saved my bacon on a number of different occasions.  but on many of those occasions, i had to go back quite a bit further than 3 weeks to restore what i needed.  if that's all i'm going to get from time machine, it's usefulness to me is slashed by about 80%.

    Time Machine automatically deletes older snapshots to make room for new ones. If your backup history is shorter than you expect, it may be because you're backing up one or more large files frequently.
    Virtualization software such as VMware, Parallels, or VirtualBox creates a large virtual-disk container that is constantly changing, so it has to be backed up every time Time Machine runs. That will quickly fill up any backup destination.
    You should exclude the virtual-disk file(s) from your Time Machine backups. To do that, click the Options button in the  Time Machine preference pane. You may also be able to do it in the virtualization app's settings. Back up the files on the virtual disk from within the guest system, using a native backup application.
    A compromise solution is to create a "snapshot" of the virtual machine in the virtualization software (not a Time Machine snapshot.) That will give you a single large file that never changes and only has to be backed up once. All the subsequent changes will be stored in a new file that's initially much smaller, but will grow over time. You should still exclude that file from TM backup. If you ever need to restore the VM from Time Machine, you'll have a working setup, which will make it easy for you to restore the rest of the data from within the guest system.
    Another common cause of large TM snapshots is native OS X disk images. If you store a lot of data on one or more writable disk images, they should be in "sparsebundle" format, which will be backed up much more efficiently than any other format. A sparsebundle will not be backed up at all while the image is mounted. Make sure you unmount the image often so it can be backed up. Consider eliminating large read/write disk images from your workflow, if possible.

  • How is it I purchased a brand new phone less than 30 days ago and when defective I'm given a used phone and find a replacement sent slow mail?

    I opened an account with added lines with Verizon about Nov 14th. Not 30 days has passed and yesterday in the middle of using my fully charged HTC One M8 Windows phone the screen went dark. I can hear incoming service but of course the phone is useless.
    I was promised a replacement and told by the tier 2 support person last night that the replacement would be out overnight. I checked earlier and no status was available, and I checked now after waiting today for the phone, and now I see the phone was not sent overnight, and further that I will be sent a "like new" used replacement. I paid a substantial down payment and will be continuing to pay the new phone price, but now I am being given a used phone though still paying for new.
    I am really unhappy about how this less than 30 day customer who is not going to a discount carrier is getting treated. Someone credited me for the few days service I am out...but that still does not resolve the used phone issue. Is this something I need to take up with the BBB?

    Sucks, but it is in the contract you signed. Within 14 days, return the phone and get a new one, after 14 days, it is a used phone and gets replaced with a used phone. I had this happen to me, felt a bit cheated, but you know what, that phone lasted the entire rest of the contract without issues and continued to work when I passed it on to family.
    The only alternative would be to work directly with HTC, the manufacturer of the phone and try to get a new replacement. However, almost every company does exactly what Verizon does in this situation. Since Verizon is keeping to the terms of the agreement you both agreed to, the BBB will not see any problem and not have any reason to act.

  • My buttons won't work!!!! I've only had my nano for less than 3 months!!

    I've had my Nano ipod for less than 3 months. Today at work while I was listening to it, I accidentally spilt water on the table that the ipod was sitting on. My Nano ipod has a plastic case for protection and I leave it on at all times. A little bit of water may have penetrated the Ipod. But I wiped it dry straight away.
    I have tried EVERYTHING prescribed on this website. The backlight comes on everytime I shift the hold button from left to right. The PROBLEM is with the main buttons. I have charged it for several hours. I'm stuck on the main menu. I cannot get the buttons to work at all.
    Does anyone have any suggestions on how to rectify this problem? I don't want to send it to the service centre until I am 100% sure that there's nothing that I can do to fix it.
    The other thing, my friend bought my nano in New York city and brought it back for me in Sydney Australia. Do you think I'm going to have any problems getting it fixed here?
    Thanks a million!!

    I was listening to my iPod with a friend of mine. We were listening to a Maroon 5 song, and we wanted to change it, so I hit menu. It freezes up. Mine occasionally freezes every now and again, so I tried to reset it. It does it, but the main buttons don't work. I can reset it, but that's about it, and the hold works. I tried restoring it, and I don't know what to do now. I had brought it to the beach, but I kept it in a beach bag and its case the whole time. It did work before, then it just froze.
    Anyone have any suggestions? I've had it since January and don't want it to be dead yet..
      Windows XP  

  • Just Curious: Cropping Display for "Less than Ideal" Resolution​s?

    Hey there, its me again. This isn't a "life or death" type of thing, more just a "curiosity"; 'cuz I remember back when I had my classic hp zt1250, whenever the resolution was less than its full capabilities (1024X768), it would resize the input to the correct size, so for example if you were say, installing Windows (where the installer is only 640X480 or 800X600 or somethin' like that), instead of stretching it to the full screen and making it look crappy, it would box it in so that it would only take up those 800X600 or 640X480 pixels of the screen (in the end, you'd see a black box around the part of the screen where there was an image). On a laptop with such an awkward aspect ratio, it bugs me how the "Starting Windows" animation is stretched out (trivial, I know) because it is only in 1024X769 instead of the machine's native 1280X800 Resolution, so I was wondering if this is corrected in a BIOS update somewhere or if it was "Just another one of those oversights" on these fancy "Newish" laptops.
    Thanks.
    Dr Robinson

    yigit wrote:
    have you read installation instructions?
    you may need to use dos to flash bios upgrade.
    http://www-307.ibm.com/pc/support/site.wss/documen​t.do?sitestyle=lenovo&lndocid=MIGR-68504
    http://www-307.ibm.com/pc/support/site.wss/documen​t.do?sitestyle=lenovo&lndocid=MIGR-67975
    please post type and windows that you are using ( 32/64 bit xp/vista/7 )
    Maybe it was just me, but I couldn't find anything in the instructions for updating outside of WinPhlash.
    ?? http://download.lenovo.com/ibmdl/pub/pc/pccbbs/mob​iles/68et37ww.txt
    It does say something about not functioning in 64 Bit Windows, so that may be our problem.
    Dr Robinson

  • Will a g4 17" powerbook purchased new n 2006 accept a SATA less than 500 GB HDD

    I have a 17"G4 powerbook lap top purchased new in 2006. The HDD just went on a walkabout. I want to knowifthe puter willl accept a SATA less than 500GB 7200 rpm HDD replacement. If so what bits and pieces would I need to effect such an upgrade?

    This is what you are stuck with in the G4.
    Hard Drive Interface
    Ultra ATA/100 (ATA-6)
    Links to this kind of drive. Or try google and Amazon (2.5 ATA hard drive). There isn't as much choice as these have not been OEM equiped for several years. I bought a spare for my G4 12" some time ago just in case I would need it. Finding a SCSI drive is even more challenging
    http://www.wegenermedia.com/hdd.htm
    http://eshop.macsales.com/shop/hard-drives/2.5-Notebook/

  • Less than or equal to broken?

    Download the vi and check out the internals, as they will explain exactly what I'm trying to do.
    Briefly, I am writing a deMUX for a signal that has digital components
    of 0.25V, 0.5V, 1V, 2V, and 4V. The max signal being 7.75V and the min
    being 0V. For example, if the input is 0.25V, the 5 bit digital output
    will be 00001; if the input is 0.50V, the digital output will be 00010;
    if the input is 0.75, then the digital output will be 00011; ... and if
    the input is 7.75, then the digital output will be 11111.
    In order to make the system realistic I have added tolerances to the
    search. So, the tolerance I picked is 0.1V (which is well less than the
    required 1/2 of the smallest voltage increment of 0.25V, which is
    0.125V). Thus, any of the 32 possible voltages +/- 0.1V should decode
    correctly according to the <= circuit I have set up toward the
    bottom of my while loop in the attached vi. It does work for most, but
    it does not work for 1.1V, 2.1V, and 3.1V... and possibly some others.
    For these listed numbers, the comparison acts as a less than, rather
    than a less than or equal to.
    Let me know if you need more information.
    Cheers,
    Joe
    Attachments:
    Full.vi ‏39 KB

    To solve your problem, all you need is to "quantize" the number to your smallest step (0.25 in your case) and convert it to an integer.
    The attached code will probably produce the output you want.
    Message Edited by altenbach on 12-21-2005 09:28 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    FullMOD.vi ‏16 KB
    FullMOD.png ‏3 KB

Maybe you are looking for