This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler: Problem concatenating tokens during preprocessing



Tool/software: TI C/C++ Compiler

hi,

using new Ti complier 8.3.4 ,  appear the error "line 46: warning: concatenation with "11.0," in macro "INVPRIMENUMBER" does not create a valid token"

Code:

#define INVPRIMENUMBER(arg) FLOAT2FIX(1.0/##arg##.0, INVPRIMENUMBER_FRAC)

INVPRIMENUMBER(11)

thanks

Br

guofei

  • For the source file you build when this happens ...

    guofei yan said:
    appear the error "line 46: warning: concatenation with "11.0," in macro "INVPRIMENUMBER" does not create a valid token"

    Please add the build option --gen_preprocessor_listing and build again.  This creates a preprocessor listing file with the same name as the source, but with the file extension changed to .rl.  Attach that file to your next post.  Because the forum does not accept a file with the extension .rl, add the file extension .txt to form a name similar to source_file.rl.txt.  

    It is also very important you show all the build options exactly as the compiler sees them.

    Thanks and regards,

    -George

  • hi, George

        I try to use  the option --gen_preprocessor_listing   to bulid again. But I can not find .rl  file.

    I add two following build option in my makefile. Could you please help to check if it is right?

    EXTRA_CFLAGS  += --gen_preprocessor_listing
    EXTRA_LDFLAGS += --gen_preprocessor_listing

    Br

    guofei

  • If you show me exactly how the compiler is invoked, I can tell you where to find the .rl file.  Here are some example situations to consider.

    If you don't use any unusual options, the .rl file is created in the current directory when the compiler is invoked.  This is often the same directory as the source file, but it may not be.

    If you use the option --obj_directory=directory_name, or other options like it, then the .rl file is created in the directory named by that option.

    Search your project directories for all the .rl files, and you'll probably find it.

    Thanks and regards,

    -George

  • Did you find the .rl file?  If so, please submit it.

    Thanks and regards,

    -George

  • Since it has been a while, I presume you resolved your problem.  I'd appreciate hearing how you resolved it.

    Thanks and regards,

    -George