#48 Multiple 'components' for a module is not "redefinition"

ncc (18)
Tom Parker

If we specify the same component in multiple components lines in a configuration

e.g two "components Main;" lines

we get the error "redefinition of 'Main'", when it isn't being redefine, but is a duplicate of an earlier definition. Provided that the same name maps to the same module in each case (i.e. no 'x as y' usage, or the same 'y'), I believe this should not be an error.

Under most normal circumstances, this isn't that much of a problem, but when we want to do things like generating parts of a configuration from #define'ed blocks, we have to know what's inside the blocks (which ruins part of their point).


  • David Gay

    David Gay - 2007-11-16

    Logged In: YES
    Originator: NO

    This is correct behaviour (see the reference manual), though arguably confusing.

    components X as Y; is technically a definition of Y.
    components X; is a shorthand for components X as X;

    components Main;
    components Main;
    is a redefinition of Main.

  • David Gay

    David Gay - 2007-11-16
    • status: open --> closed-invalid

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks